iGET

C Programming - MCQ Practice Questions

Practice free C Programming multiple-choice questions with detailed answers and explanations. Perfect for competitive exam preparation.

978 questions | 100% Free

Q.201Easy

Which of the following statements about structures is TRUE?

Q.202Easy

Consider the following code: struct Data { int a; char b; }; struct Data d = {10, 'A'}; Which method of initialization is used here?

Q.203Easy

What is the primary difference between a struct and a union in C?

Q.204Easy

Which of the following correctly demonstrates accessing a member of a pointer to a structure?

Q.205Easy

In C, what does the 'typedef' keyword do when used with structures?

Q.206Easy

Given: struct Node { int data; struct Node *next; }; This represents which data structure concept?

Q.207Easy

In the context of structures, what does 'self-referential' mean?

Q.208Easy

What is the key difference between a structure and a union in C?

Q.209Easy

struct Node { int data; struct Node *next; }; This is an example of which design pattern?

Q.210Easy

Given a structure with array members, how would you efficiently pass it to a function to avoid copying overhead?

Q.211Easy

Which function is used to open a file in C?

Q.212Easy

What does the mode 'rb' mean in fopen()?

Q.213Easy

Which function is used to close a file in C?

Q.214Easy

Which mode opens a file for writing and truncates it if it exists?

Q.215Easy

When opening a file in 'w' mode, what happens if the file already exists?

Q.216Easy

Which of the following file modes in fopen() allows reading only?

Q.217Easy

In file handling, what does the 'b' flag in file modes like 'rb' or 'wb' indicate?

Q.218Easy

Which function is used to determine the current position in a file?

Q.219Easy

What is the correct syntax to open a file named 'data.txt' in read mode?

Q.220Easy

Which mode allows both reading and writing to a file, creating it if it doesn't exist?