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. Which of the following is correct mathematical operations in C Programming?

sqrt
pow
ceil
All of the above

2. FILE is of type ______

int type
char * type
struct type
None of the mentioned

3. What is the output of this program?

#include <stdio.h>
void main(){
char c[] = "GATE2011"; 
char *p =c; 
printf("%s", p + p[3] - p[1]);
}

GATE2011
E2011
2011
11

4. #define can be used to define alias for values as well

TRUE
FALSE
Can be true or false
Can not say

5. What will be the output ?

void main()
{
char far *farther, *farthest;
printf("%d %d", sizeof(farther), sizeof(farthest));
}

4 2
2 2
4 4
2 4

6. Which of the following typecasting is accepted by C?

Widening conversions
Narrowing conversions
Widening & Narrowing conversions
None of the above

7. What is the output of this program?

int main()
{
char ch;
ch = 128;
printf("%d", ch);
return 0;
}

128
-128
Depends on compiler
None of the above

8. What will be output for the following code?

int main()
{
    printf(""Hello"");
    main();
    return 0;
}

Hello is printed once
Hello infinite number of times
Hello is not printed at all
0 is returned

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

10. What is the output of this program?

void main()
{
      int a[8] = {1,2,3,4,5};
      printf("%d", a[5]);
}

5
6
0
Garbage Value

Results