C Programming Quiz

Play this C quiz that will help you to excel in C certification exams, placements etc. This C programming quiz consist of 10 questions that you need to solve in 10 minutes. We’ve specially designed this quiz so that you can quickly acquaint to the pattern of questions you can be asked in placement drives, certification exams etc. This C programming test enables you to assess your knowledge of C programming.

Take the Free Practice Test


Practice C MCQ Questions, which will help you in understanding programming concepts and also helps you to prepare for placements, technical rounds, interviews, competitive exams etc.

C Quiz

Try Free C Quiz, to start a quiz you need to login first, after login you will get start quiz button and then by clicking on that you can start quiz. You will get 10 Minutes to answer all questions.

C Quiz

1. Which of the following are themselves a collection of different data types?

None of the above

2. What is true about strftime function?

This function is used to get current system time as structure
This function is used to get the difference between two given times
This function interprets tm structure as calendar time
This function is used to modify the actual time format

3. All the functions available in this library take double as an argument and return double as the result.

Can be yes or no
Can not say

4. String handling functions such as strcmp(), strcpy() etc can be used with enumerated types.

May Be
Can't Say

5. Which of the following share a similarity in syntax? 1. Union 2. Structure 3. Arrays 4. Pointers

3 and 4
1 and 2
2 and 3
All of the above

6. In Implicit type conversion, If an operand of long int is present then the other operand will be converted to ?

unsigned int
unsigned long int
long int

7. The C library function double fmod(double x, double y) returns the remainder of x divided by y.

log10(double x, double y)
fabs(double x, double y)
fmod(double x, double y)
floor(double x, double y)

8. What is the output of this program?

#include <stdio.h>
int main()
   printf("%d", 5.00);
   return 0;

Compilation error
Garbage value

9. The reason for using pointers in a Cprogram is

Pointers allow different functions to share and modify their local variables.
To pass large structures so that complete copy of the structure can be avoided.
Pointers enable complex “linked" data structures like linked lists and binary trees.
All of the above

10. What is the output of this program?

#include <stdio.h>
int main(){
   struct simp 
		int i = 6;
		char city[] = "chennai";
	struct simp s1;
	printf("%d", s1.i);
    return 0;

chennai 6
Nothing will be displayed
Runtime Error
Compilation Error