C Miscellaneous MCQs

70 questionsC-ProgramPage 1 of 8

Practice free C Miscellaneous multiple-choice questions with instant answer feedback and step-by-step solutions. Click an option to check yourself, reveal the full explanation, and work through all 70 questions — no login required.

Question 1medium
Determine output:
void main()
{
      int const *p=5;
      printf("%d", ++(*p));
}
Question 2hard
Determine Output:
void main()
{
      char s[]="man";
      int i;
      for(i=0; s[i]; i++)
            printf("%c%c%c%c ", s[i], *(s+i), *(i+s), i[s]);
}
Question 3hard
Determine Output:
void main()
{
      float me = 1.1;
      double you = 1.1;
      if(me==you)
            printf("I hate Examveda");
      else
            printf("I love Examveda");
}
Advertisement
Question 4hard
Determine Output:
void main()
{
      static int var = 5;
      printf("%d ", var--);
      if(var)
            main();
}
Question 5hard
Determine Output:
void main()
{
      char *p;
      printf("%d %d", sizeof(*p), sizeof(p));
}
Question 6medium
Determine the Final Output:
void main()
{
      printf("\nab");
      printf("\bsi");
      printf("\rha");
}
Advertisement
Question 7hard
Determine Output:
void main()
{
      int i=10;
      i=!i>14;
      printf("i=%d", i);
}
Question 8hard
Determine Output:
void main()
{
      int c = - -2;
      printf("c=%d", c);
}
Question 9easy
Determine Output:
#define int char
void main()
{
      int i = 65;
      printf("sizeof(i)=%d", sizeof(i));
}