C Miscellaneous MCQs
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 10hard
Determine Output:
void main()
{
int i=3;
switch(i)
{
default: printf("zero");
case 1: printf("one"); break;
case 2: printf("two"); break;
case 3: printf("three"); break;
}
}Question 11hard
Determine Output:
void main()
{
char string[]="Hello World";
display(string);
}
void display(char *string)
{
printf("%s", string);
}Question 12hard
Determine Output:
void main()
{
int i=5;
printf("%d%d%d%d%d", i++, i--, ++i, --i, i);
}Advertisement
Question 13easy
Determine Output:
#define square(x) x*x
void main()
{
int i;
i = 64/square(4);
printf("%d", i);
}Question 14hard
Determine Output:
void main()
{
char *p="hi friends", *p1;
p1=p;
while(*p!='\0') ++*p++;
printf("%s", p1);
}Question 15easy
Determine Output:
#include<stdio.h>
#define a 10
void main()
{
#define a 50
printf("%d", a);
}Advertisement
Question 16easy
Determine Output:
#define clrscr() 100
void main()
{
clrscr();
printf("%d", clrscr());
}Question 17hard
Determine Output:
void main()
{
printf("%p", main);
}Question 18hard
Determine Output:
void main()
{
char far *farther, *farthest;
printf("%d..%d", sizeof(farther), sizeof(farthest));
}