

MCQOPTIONS
Saved Bookmarks
This section includes 174 Mcqs, each offering curated multiple-choice questions to sharpen your C Programming knowledge and support exam preparation. Choose a topic below to get started.
151. |
Which of the following cannot be used inside sizeof? |
A. | pointers |
B. | functions |
C. | macro definition |
D. | none of the mentioned |
Answer» E. | |
152. |
How many digits are present after decimal in float value? |
A. | 1 |
B. | 3 |
C. | 6 |
D. | 16 |
Answer» D. 16 | |
153. |
What is the sizeof(void) in a 32-bit C? |
A. | 0 |
B. | 1 |
C. | 2 |
D. | 4 |
Answer» C. 2 | |
154. |
Which of the following is a ternary operator? |
A. | && |
B. | >>= |
C. | ?: |
D. | -> |
Answer» D. -> | |
155. |
Relational operators cannot be used on ____________ |
A. | structure |
B. | long |
C. | strings |
D. | float |
Answer» B. long | |
156. |
Which of the following declaration is not supported by C? |
A. | String str; |
B. | char *str; |
C. | float str = 3e2; |
D. | Both String str; & float str = 3e2; |
Answer» B. char *str; | |
157. |
Which of the following operator has the highest precedence in the following? |
A. | () |
B. | sizeof |
C. | * |
D. | + |
Answer» B. sizeof | |
158. |
The format identifier '%i' is also used for _____ data type. |
A. | char |
B. | int |
C. | float |
D. | double |
Answer» C. float | |
159. |
When do you need to use type-conversions? |
A. | The value to be stored is beyond the max limit |
B. | The value to be stored is in a form not supported by that data type |
C. | To reduce the memory in use, relevant to the value |
D. | All of the mentioned |
Answer» E. | |
160. |
Which of the following are unary operators? |
A. | sizeof |
B. | – |
C. | ++ |
D. | all of the mentioned |
Answer» E. | |
161. |
What is the precedence of arithmetic operators (from highest to lowest)? |
A. | %, *, /, +, – |
B. | %, +, /, *, – |
C. | +, -, %, *, / |
D. | %, +, -, *, / |
Answer» B. %, +, /, *, – | |
162. |
enum types are processed by _________ |
A. | Compiler |
B. | Preprocessor |
C. | Linker |
D. | Assembler |
Answer» B. Preprocessor | |
163. |
Do logical operators in the C language are evaluated with the short circuit? |
A. | True |
B. | False |
C. | Depends on the compiler |
D. | Depends on the standard |
Answer» B. False | |
164. |
Where in C the order of precedence of operators do not exist? |
A. | Within conditional statements, if, else |
B. | Within while, do-while |
C. | Within a macro definition |
D. | None of the mentioned |
Answer» E. | |
165. |
Which of the following is possible with any 2 operators in C? |
A. | Same associativity, different precedence |
B. | Same associativity, same precedence |
C. | Different associativity, different precedence |
D. | All of the mentioned |
Answer» E. | |
166. |
function tolower(c) defined in library
|
A. | Ascii character set |
B. | Unicode character set |
C. | Ascii and utf-8 but not EBCDIC character set |
D. | Any character set |
Answer» E. | |
167. |
Which of the following is an invalid assignment operator? |
A. | a %= 10; |
B. | a /= 10; |
C. | a |= 10; |
D. | None of the mentioned |
Answer» E. | |
168. |
C99 standard guarantees uniqueness of ____ characters for internal names. |
A. | 31 |
B. | 63 |
C. | 12 |
D. | 14 |
Answer» C. 12 | |
169. |
Are logical operator sequence points? |
A. | True |
B. | False |
C. | Depends on the compiler |
D. | Depends on the standard |
Answer» B. False | |
170. |
What is the sizeof(char) in a 32-bit C compiler? |
A. | 1 bit |
B. | 2 bits |
C. | 1 Byte |
D. | 2 Bytes |
Answer» D. 2 Bytes | |
171. |
%lf is used to display? |
A. | float |
B. | long float |
C. | double |
D. | all of the mentioned |
Answer» D. all of the mentioned | |
172. |
For which of the following, “PI++;” code will fail? |
A. | #define PI 3.14 |
B. | char *PI = “A”; |
C. | float PI = 3.14; |
D. | none of the Mentioned |
Answer» B. char *PI = “A”; | |
173. |
When double is converted to float, then the value is? |
A. | Truncated |
B. | Rounded |
C. | Depends on the compiler |
D. | Depends on the standard |
Answer» D. Depends on the standard | |
174. |
Which among the following are the fundamental arithmetic operators, i.e, performing the desired operation can be done using that operator only? |
A. | +, – |
B. | +, -, % |
C. | +, -, *, / |
D. | +, -, *, /, % |
Answer» B. +, -, % | |