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. Variable names beginning with underscore is not encouraged. Why?

It is not standardized
To avoid conflicts since assemblers and loaders use such names
To avoid conflicts since library routines use such names
To avoid conflicts with environment variables of an operating system

2. A compiler is

a machine-independent and OS-independent
machine-dependent and OS-dependent
machine-dependent and OS-independent
machine-independent and OS-dependent

3. What is the output of this program?

#include <stdio.h>
int main()
{
    enum days {MON=-1, TUE, WED=4, THU, FRI, SAT};
    printf("%d, %d, %d, %d, %d, %d", MON, TUE, WED, THU, FRI, SAT);
    return 0;
}

-1 0 4 5 6 7
-1 0 1 2 3 4
0 1 2 3 4 5
Error

4. What is the output of this program?

#include <stdio.h>         
struct student
{
  char *c;
};
void main()
{
  struct student s[2];
  printf("%d", sizeof(s));
}

2
4
16
8

5. A program that converts a high level language program to a set of instruc-tions that can run on a computer is called a ?

compiler
debugger
editor
none of the above

6. What will be the output of the program?

 int a=0,b=2;
 if(a=0) b=0;
 else b*=10;

0
20
2
None of the above

7. Identify the trigraph sequence for^.

??/
??=
??
??!

8. Are the three declarations char **apple, char *apple[], and char apple[][] same?

TRUE
FALSE
May Be
Can't Say

9. What is the output of this program?

int main()
{
 
    int a = 1, b = 0;
    int c = a%2 ? a++ : a-- ? a=0 : ++b ? b = 2 : b++ ;
    printf("%d", c);
    return 0;
}

1
2
3
0

10. Switch statement accepts.

int
char
long
All of the above

Results