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 the return value of putchar()?

The character written
EOF if an error occurs
Nothing
Both character written & EOF if an error occurs

2. 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.city);
	printf("%d", s1.i);
    return 0;
}

chennai 6
Nothing will be displayed
Runtime Error
Compilation Error

3. Indicate which of the following is not true about an interpreter?

Interpreter generates an object program from the source program
Interpreter is a kind of translator
Interpreter analysis each source statement every time it is to be executed
None of the above

4. How many x are printed?

    for(i=-2,j=5;i < j;i++,j--) 
        printf("x");

10
5
4
6

5. What is the output of this program?

#include <stdio.h>
#define clrscr() 17
int main()
{
  clrscr();
  printf("%d",clrscr());
  return 0;
}

Compilation error
Runtime error
17
none of the above

6. What is the output of this program?

#include <stdio.h>
# define loop while(true)
int main()
{
    loop;
    printf("c-letsfind");
    return 0;
}

program never ends
c-letsfind
Compilation error
None of the above

7. 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

8. What is the output of this program?

#include <stdio.h>
void main()
{
  struct number
  {
    int no;
    char name[20];
  };
  struct number s;
  s.no = 50;
  printf("%d", s.no);
}

Nothing
Compile time error
Junk
50

9. what is the inital value of extern storage class specifier?

0
Null
Garbage
Infinite

10. What is the output of this program?

void main()
  {
  struct bitfields {
  int bits_1: 2;
  int bits_2: 9;
  int bits_3: 6;
  int bits_4: 1;
  }bit;
  printf("%d", sizeof(bit));
}

2
3
4
0

Results