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. A text stream is an ordered sequence of characters composed into lines, each line consisting of zero or more characters plus a terminating new-line character.

TRUE
FALSE
May Be
Can't Say

2. Which of the following operator has highest Precedence?

*
/
~
[]

3. Which of the following statements are correct ?
1: A string is a collection of characters terminated by '.
2: The format specifier %s is used to print a string.
3: The length of the string can be obtained by strlen().
4: The pointer CANNOT work on string.

1,2,3
1,2
2,4
3,4

4. First version of C Programming language is ____ .

K&R
C89
ANSI
R&K

5. What is the output of this program?

#include <stdio.h>
void test(int *a, int *b) 
{ 
  a = b; 
  *a = 15; 
} 
int x = 10, y = 20; 
int main() 
{ 
  test(&x, &y); 
  printf("%d %d", x, y);
  return 0; 
}

15 15
10 15
10 20
15 20

6. What does the following statment mean?

    int (*ptr)[5];

ptr is an array of 5 integers
ptr is a pointer to an array of 5 integers
ptr is array of pointers to 5 integers
ptr is an pointer to array

7. do-while loop terminates when conditional expression returns?

One
Zero
Non - zero
None of the above

8. What will be output for the following code?

#include<stdio.h> 
int main() 
{ 
    double x = 1.2; 
    int sum = (int)x + 1; 
  
    printf(""sum = %d"", sum); 
  
    return 0; 
} 

sum = 2
sum = 1
sum = 0
sum = 3

9. The errors that can be pointed out by the compiler are?

syntax errors
semantic error
logical error
none of the above

10. What is the output generated by the following code?
    #define square (a) (a*a)     printf("%d", square (4+5) ) ;

81
4
29
None of the above.

Results