C- Declarations and Initializations Questions and Answers
Practice ModeShowing 10 of 49 questions
Q21
What does the volatile keyword indicate?
Answer: Option B
Explanation: volatile tells compiler that variable may change unexpectedly.
Q22
Which of the following is not a primitive data type in C?
Answer: Option D
Explanation: Array is a derived data type, not primitive.
Q23
What is the maximum length of a variable name in C?
Answer: Option A
Explanation: C standard specifies minimum requirements for identifier length.
Q24
Which of the following is a valid constant declaration?
Answer: Option D
Explanation: Constants can be defined using const keyword or #define.
Q25
What is the scope of a local variable?
Answer: Option B
Explanation: Local variables are accessible only within their block.
Q26
Which operator is used to get the address of a variable?
Answer: Option B
Explanation: & operator returns the memory address of a variable.
Q27
What is the output of: int x = 5; printf("%d", x++);
Answer: Option A
Explanation: Post-increment returns original value then increments.
Q28
Which of the following is a valid array declaration?
Answer: Option D
Explanation: Array declarations require size or initialization.
Q29
What does the register keyword suggest to the compiler?
Answer: Option B
Explanation: register suggests storing variable in CPU register for faster access.
Q30
Which of the following is not a valid C variable name?
Answer: Option A
Explanation: Variable names cannot start with a digit in C.