Bird
0
0

Why do we need variables in a C program?

easy📝 Conceptual Q11 of 15
C - Variables and Data Types
Why do we need variables in a C program?
ATo create functions automatically
BTo make the program run faster by skipping calculations
CTo write comments inside the code
DTo store and manage data that can change during program execution
Step-by-Step Solution
Solution:
  1. Step 1: Understand the role of variables

    Variables hold data values that can change while the program runs, allowing dynamic behavior.
  2. Step 2: Compare other options

    Options B, C, and D describe unrelated tasks: speeding up code, commenting, and creating functions, which are not the purpose of variables.
  3. Final Answer:

    To store and manage data that can change during program execution -> Option D
  4. Quick Check:

    Variables store changing data = A [OK]
Quick Trick: Variables hold changing data in programs [OK]
Common Mistakes:
  • Thinking variables speed up the program
  • Confusing variables with comments
  • Believing variables create functions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More C Quizzes