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



C MCQs

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. What is a preprocessor directive

a message from compiler to the programmer
a message from programmer to the microprocessor
a message from programmer to the preprocessor
a message from compiler to the linker

2. Identify the wrong statement?

# define is a preprocessor facility.
# define aids in modifying a constant value throughout the program.
# define uses a statement terminator.
# define improves the readability of the program.

3. Which of the following is correct mathematical operations in C Programming?

sqrt
pow
ceil
All of the above

4. If the two strings are identical, then strcmp() function returns

-1
1
0
None

5. Which of the following format specifiers is used to specify whether the given time is in AM or PM?

%q
%p
%Q
%P

6. What is the output of this program?

#include <stdio.h>
void main()
{   char a=0;
    for(a=0;a<=127;a++)
    {
        printf("%d ",a);
    }
}

0 1 2 ... 127
0 1 2 ... infinite times
Compilation Error
None of the above

7. Which of the following library functions returns the time in UTC (Greenwich mean time) format?

localtime()
gettime()
gmtime()
settime()

8. What is the output of this program?

void main()
{ 
      int i=5; 
      i = !i>10; 
      printf("%d", i); 
}

5
10
0
None of the above

9. Many features of C were derived from which language ?

PASCAL
B
BASIC
FORTRAN

10. A string that is a formal parameter can be declared

An array with empty braces
A pointer to character
Both A and B
None of the above

Results