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 statement are correct? (I) The maximum value a variable can hold depends upon its storage class. (II) By default all variables enjoy a static storage class.

Only I is correct
Only II is correct
Both I & II are correct
Both I & II are incorrect

2. The information about an array used in program will be stored in

Symbol Table
Activation Record
Dope Vector
Both A and B

3. Which of the following is an invalid if-else statement?

if (if (a == 1)){}
if (a){}
if ((char) a){}
if (func1 (a)){}

4. Which of the following statements about stdout and stderr are true?

Same
Both connected to screen always.
Both connected to screen by default.
stdout is line buffered but stderr is unbuffered.

5. In order to fetch the address of the variable we write preceding _________ sign before variable name.

Percent(%)
Comma(,)
Ampersand(&)
Asteric(*)

6. What will be the output of the program in 16 bit platform ?

#include <stdio.h>
int main()
{
    extern int i;
    i = 20;
    printf("%d", sizeof(i));
    return 0;
}

2
4
8
Linker Error

7. Choose the statement which is incorrect with respect to dynamic memory allocation.

Memory is allocated in a less structured area of memory, known as heap
Used for unpredictable memory requirements
Execution of the program is faster than that of static memory allocation
Allocated memory can be changed during the run time of the program based on the requirement of the program

8. The parameter passing mechanism for an array is

call by value
call by reference
call by value-result
None of the above

9. Identify the stringizing operator.

+
::
#
##

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

Results