Bird
0
0

What is the purpose of header files in a C program?

easy📝 Conceptual Q2 of 15
C - Basics and Execution Environment
What is the purpose of header files in a C program?
ATo define the main() function
BTo include declarations and macros
CTo store program output
DTo write comments
Step-by-Step Solution
Solution:
  1. Step 1: Understand header file role

    Header files provide declarations of functions and macros used in the program.
  2. Step 2: Differentiate from other parts

    Main() defines execution start, output is runtime, comments are for notes.
  3. Final Answer:

    To include declarations and macros -> Option B
  4. Quick Check:

    Header files = declarations/macros [OK]
Quick Trick: Header files hold declarations, not code execution [OK]
Common Mistakes:
  • Confusing header files with main function
  • Thinking header files store output

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes