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 output of this program?

#include <stdio.h>
int main()
{
	printf("variable! %d", x);
    return 0;
}

variable! x
variable! followed by a junk value
Compile time error
variable!

2. When a recursive function is called in the absence of an exit condition, it results in an infinite loop due to which the stack keeps getting filled(stack overflow). This results in a run time error.

TRUE
FALSE
Can be true or false
Can not Say

3. argc refers to the?

number of arguments passed
a pointer array
Both A and B
None of the above

4. In Implicit type conversion, If an operand of type long double is present in the expression, then the corresponding operand will also be converted to?

double 
long double
int
float 

5. What is the output of the following code?

int main()
{
    int i = 0;
    switch(i)
    {
    case 0 : i++;
    case 1 : i+++2;
    case 2 : ++i;
    }
    pritnf("%d",i++);

    return 0;
}

2
3
4
5

6. How will you free the memory allocated by the following program?

#include <stdio.h>
#define CONDITION(x)
printf("letsfindcourse");                         
int main()
{
  CONDITION(0);
  return 0;
}

Runtime Error
letsfindcourse
Compilation error
None of the above

7. Will the program compile?

#include<stdio.h>
int main()
{
    char str[5] = "Letsfind";
    return 0;
}

TRUE
FALSE
May Be
Can't Say

8. Which of the following statement is True?

User has to explicitly define the numeric value of enumerations
User has a control over the size of enumeration variables.
Enumeration can have an effect local to the block, if desired
Enumerations have a global effect throughout the file.

9. It is not possible to create an array of pointer to structures.

TRUE
FALSE
May Be
Can't Say

10. What is the scope of extern class specifier?

Within block
Within Program
Global Multiple files
None of the above

Results