iGET

C Programming - MCQ Practice Questions

C questions in placement tests and university exams are rarely about syntax alone. Most of what you will find here is output prediction, pointer arithmetic, arrays and strings, structures and unions, storage classes, recursion, and file handling. The explanations walk through memory behaviour step by step, which is usually where the confusion sits rather than in the code itself.

972 questions | 100% Free

Q.41Medium

What is the purpose of using anonymous structures/unions?

Q.42Medium

Consider this structure: struct Complex { int real; int imag; }; If you want to create an array of 100 such structures, which declaration is correct?

Q.43Medium

Consider the following code:
struct Data {
int x;
char y;
double z;
};
Assuming int=4 bytes, char=1 byte, double=8 bytes, what is the size of struct Data due to padding?

Q.44Medium

Which feature in C allows you to define a structure without a tag name for use within another structure?

Q.45Medium

In the context of bit fields in structures, what is the maximum number of bits that can be allocated to a single member in standard C?

Q.46Medium

Which of the following statements about structure initialization in C is INCORRECT?