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.581Easy

What will be the output of sizeof(union test) if union has members: int a, char b, float c?

Q.582Easy

Which keyword is used to define a structure in C?

Q.583Easy

What is the size of the following structure?
struct point { int x; int y; float z; };

Q.584Easy

Can we pass a structure variable to a function in C?

Q.585Medium

What happens when you initialize a structure variable without assigning values?

Q.586Medium

Which of the following correctly declares a pointer to a structure?

Q.587Medium

What is the difference between struct and typedef struct?

Q.588Medium

What will be printed?
struct s { int a; char b; int c; }; printf("%lu", sizeof(struct s));

Q.589Medium

How do you access a member of a structure using a pointer?

Q.590Medium

What is the purpose of padding in structures?

Q.591Medium

Consider: union u { int x; double y; }; What is sizeof(u)?

Q.592Hard

Which statement is true about nested structures in C?

Q.593Hard

What happens if you assign a union member and then access another member?
struct u { int a; char b; }; u.a = 257; printf("%d", u.b);

Q.594Hard

How can you initialize a structure array of 10 elements partially in C?

Q.595Hard

What is the difference between self-referential and recursive structures?

Q.596Hard

Given union test { int x; char y[4]; }; If you set y[0]=65, y[1]=66, what happens to x?

Q.597Easy

Which of the following is a key difference between struct and union in C?

Q.598Easy

What will be the output of sizeof() for the following union? union data { int a; float b; double c; }

Q.599Easy

In C, what is a self-referential structure?

Q.600Easy

Which keyword is used to define a new name for a structure in C?