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

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

Q.182Easy

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

Q.183Easy

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

Q.184Easy

In C, what is a self-referential structure?

Q.185Easy

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

Q.186Easy

What is the purpose of padding in C structures?

Q.187Easy

How do you access a structure member through a pointer in C?

Q.188Easy

What is the primary advantage of using structures in C?

Q.189Easy

What is the output of the following code?
struct Point { int x; int y; };
struct Point p = {5};
printf("%d %d", p.x, p.y);

Q.190Easy

Which of the following is true about typedef struct?

Q.191Easy

Consider union u { int i; char c; float f; }; What is the size of this union?

Q.192Easy

Which of these is a valid declaration of a structure variable using dot operator immediately after struct definition?

Q.193Easy

Which of the following correctly demonstrates self-referential structure (for linked list)?

Q.194Easy

When structure is passed by value to a function, which of these is true?

Q.195Easy

What is the correct way to dynamically allocate an array of structures?
struct Student { int roll; char name[50]; };

Q.196Easy

Which of the following statements about unions is correct?

Q.197Easy

Consider: union Data { int i; float f; char c; }; What is the size of this union?

Q.198Easy

How do you access a member of a structure through a pointer in C?

Q.199Easy

Which of the following correctly demonstrates a typedef for a structure?

Q.200Easy

Which of the following is the correct way to initialize a structure in C?