C Programming Multiple Choice Questions (MCQs)

We have compiled a list of 1000+ questions with answers from programming in C that help you to check your basic knowledge of C and prepare for competitive exams. All these multiple choice questions are prepared by the subject experts from authentic resources. Attempt all the questions and check your C knowledge online.

This category includes the topics such as Keywords and Identifiers, Operators, Constants, Variables, Data Types, Control Statement and Expressions, Looping, Arrays and String, Functions, Pointers, Structure and Unions, Concept of OOP.

Following are the important multiple choice questions with answers from the C, section. You can choose the correct answer from option A, B, C and D.

C Programming MCQs Practice MCQ Question and Answer

1
Which of the following is the correct syntax to output 'Hello World' in C?


2
Which header file is required for using the printf function?


3
Which of the following is used for a single-line comment in C?


4
Which data type is used to store a single character?


5
What will be the output of: printf("%d", 10 + 5 * 2);?


6
Which operator is used to get the remainder of a division in C?


7
Which function is used to read a character from the user in C?


8
Which of the following is a valid identifier in C?


9
What is the size of an int on a typical 32-bit machine?


10
What will be the output of: printf("%c", 65);?


11
Which keyword is used to define a constant in C?


12
Which format specifier is used for float values in printf?


13
Which function is used to find the length of a string?


14
Which function is used to compare two strings in C?


15
What does the continue statement do in a loop?


16
What is the return type of malloc() function?


17
Which keyword is used to define a macro in C?


18
Which operator is used to access members of a structure through a pointer?


19
What is the purpose of the 'break' statement in C?


20
Which of the following is a loop control structure in C?


21
Which function is used to dynamically allocate memory in C?


22
Which function is used to deallocate the memory allocated by malloc()?


23
Which keyword is used to define a new data type in C?


24
Which function is used to open a file in C?


25
Which header file is required for file operations in C?


26
Which operator is used to access a member of a structure?


27
Which function is used to copy a string in C?


28
Which loop is guaranteed to execute at least once?


29
What is the output of sizeof(char) in C?


30
What is the default return type of a function if not specified in C?