C Data Types 1 Questions and Answers
Practice ModeShowing 10 of 50 questions
Q41
What is the purpose of "auto" storage class?
Answer: Option A
Explanation: auto is the default storage class for local variables (usually omitted).
Q42
Which data type is suitable for storing a student's grade point average?
Answer: Option C
Explanation: float is suitable for GPA as it requires decimal precision.
Q43
What is the range of "signed int" on a 32-bit system?
Answer: Option D
Explanation: signed int ranges from -2,147,483,648 to 2,147,483,647 on 32-bit systems.
Q44
Which data type is used for storing double precision floating-point numbers?
Answer: Option B
Explanation: double is the double precision floating-point type in C.
Q45
What is the size of "char" data type?
Answer: Option A
Explanation: char always occupies 1 byte regardless of the system.
Q46
Which of the following is a user-defined data type?
Answer: Option D
Explanation: struct allows users to define their own data types by grouping variables.
Q47
What is the purpose of "static" storage class?
Answer: Option A
Explanation: static preserves variable value between function calls and limits scope to file/function.
Q48
Which data type would you use for a flag that can be true or false?
Answer: Option C
Explanation: C uses int with 0 for false and non-zero for true as there is no built-in boolean.
Q49
What is the range of "unsigned short int"?
Answer: Option B
Explanation: unsigned short int ranges from 0 to 65,535.
Q50
Which format specifier is used for "long int"?
Answer: Option B
Explanation: %ld is used for long int in printf/scanf functions.