Explore topic-wise MCQs in C Multiple Choice.

This section includes 6 Mcqs, each offering curated multiple-choice questions to sharpen your C Multiple Choice knowledge and support exam preparation. Choose a topic below to get started.

1.

What will be the output of the following C code if the code is executed on a 32 bit platform?

A. Error
B. Size of enum variable = 2 bytes
C. Size of enum variable = 4 bytes
D. Size of enum variables = 8 bytesView Answer
Answer» D. Size of enum variables = 8 bytesView Answer
2.

What will be the output of the following C code if input given is 2?

A. 2
B. 0
C. 3
D. ErrorView Answer
Answer» E.
3.

Point out the error( if any) in the following code.

A. Error in the statement: a,b,c
B. Error in the statement: enum sanfoundry g;
C. Error in the statement: g++
D. No errorView Answer
Answer» E.
4.

Arithmetic operations such as addition, subtraction, multiplication and division are allowed on enumerated constants.

A. True
B. False
Answer» B. False
5.

Error in the statement: a,b,?

A. Error in the statement: enum sanfoundry g;
B. Error in the statement: g++
C. No error
Answer» B. Error in the statement: g++
6.

String handling functions such as strcmp(), strcpy() etc can be used with enumerated types.

A. True
B. False
Answer» B. False