C Data Types 1 Questions and Answers
Practice ModeShowing 10 of 50 questions
Q31
What is the default sign of "char" data type?
Answer: Option C
Explanation: The default sign of char is implementation-defined (can be signed or unsigned).
Q32
Which data type is used for storing monetary values with precision?
Answer: Option C
Explanation: long double provides the precision needed for monetary calculations.
Q33
What is the purpose of "register" storage class?
Answer: Option A
Explanation: register suggests to compiler to store variable in CPU register for faster access.
Q34
Which of the following is NOT a basic data type in C?
Answer: Option D
Explanation: string is not a basic data type in C; it is implemented as array of chars.
Q35
What is the range of "unsigned char"?
Answer: Option B
Explanation: unsigned char ranges from 0 to 255.
Q36
Which data type would you use for a loop counter?
Answer: Option C
Explanation: int is commonly used for loop counters as it is efficient and sufficient for most cases.
Q37
What is the difference between "signed" and "unsigned" integers?
Answer: Option A
Explanation: signed integers can represent both positive and negative numbers, while unsigned only positive.
Q38
Which data type is used for storing single precision floating-point numbers?
Answer: Option A
Explanation: float is the single precision floating-point type in C.
Q39
What is the size of "long int" on a 64-bit Linux system?
Answer: Option B
Explanation: long int is typically 8 bytes on 64-bit Linux systems.
Q40
Which format specifier is used for "unsigned int"?
Answer: Option B
Explanation: %u is used for unsigned int in printf/scanf functions.