C Data Types 1 Questions and Answers
Practice ModeShowing 10 of 50 questions
Q21
What is the size of "short int" typically?
Answer: Option B
Explanation: short int is typically 2 bytes in size.
Q22
Which data type is used for storing large integers beyond int range?
Answer: Option B
Explanation: long long can store very large integers (typically 64-bit).
Q23
What does "volatile" keyword do?
Answer: Option A
Explanation: volatile tells compiler that variable may change unexpectedly, preventing optimization.
Q24
Which is the correct declaration for a pointer to an integer?
Answer: Option C
Explanation: int *ptr is the correct syntax for declaring a pointer to an integer.
Q25
What is the range of "signed short int"?
Answer: Option C
Explanation: signed short int typically ranges from -32,768 to 32,767.
Q26
Which data type would be best for storing a person's weight?
Answer: Option B
Explanation: float is suitable for weight as it can have decimal values.
Q27
What is the purpose of "typedef" in C?
Answer: Option B
Explanation: typedef is used to create aliases for existing data types.
Q28
Which of these is a floating-point data type?
Answer: Option C
Explanation: float is one of the floating-point data types in C.
Q29
What is the size of "long long int" typically?
Answer: Option B
Explanation: long long int is typically 8 bytes (64 bits) in size.
Q30
Which format specifier is used for "double"?
Answer: Option B
Explanation: %lf is used for double in printf/scanf functions.