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 will be the output of the program?

 int a=2,b=2;
 if(a!=0) 
    b=0;
 else 
    b*=10;
 printf("%d",b);

0
20
2
None of the above

2. The mapping from assembly language instructions into machine language instructions is?

many-one
many-many
one-one
one-many

3. Select text file in which data is stored in

ASC11 code
Binary code
Octal code
text code

4. What is the output of this program?

		   
#include <stdio.h>
int demo()
{
  static int i = 0;  
  printf("%d ",i++);
}
int main()
{
  for(int j = 0 ; j < 5 ; j++ )
  {
      demo();
  }
}

0 0 0 0 0
1 1 1 1 1
1 2 3 4 5
0 1 2 3 4

5. Local variables are stored in an area called ___________

Heap
Permanent storage area
Free memory
Stack

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. What will be output for the following code?

#include <stdio.h>
int main()
{
        int a = 2;
        int b = (a++, a++);
        printf(""%d%d
"", b, a);
}

3 4
4 4
3 5
2 4

8. How will you free the allocated memory ?

remove(var-name);
free(var-name);
delete(var-name);
dalloc(var-name);

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

10. Forward declaration is absolutely necessary

If a function returns a non-integer quantity
If the function call precedes its definition
If the function call precedes its definition and the function returns a non integer quantity
None of the above

Results