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 28hard
Determine Output:
void main()
{
int i=-1, j=-1, k=0, l=2, m;
m = i++ && j++ && k++ || l++;
printf("%d %d %d %d %d", i, j, k, l, m);
}Question 29hard
Determine Output:
void main()
{
int i = -1;
+i;
printf("i = %d, +i = %d", i, +i);
}Question 30hard
Determine Output:
void main()
{
char *str1 = "abcd";
char str2[] = "abcd";
printf("%d %d %d", sizeof(str1), sizeof(str2), sizeof("abcd"));
}Advertisement
Question 31hard
Determine Output:
void main()
{
char not;
not = !2;
printf("%d", not);
}Question 32hard
Determine Output:
#include<stdio.h>
void main()
{
register i=5;
char j[]= "hello";
printf("%s %d", j, i);
}Question 33medium
Determine Output:
void main()
{
int i=5, j=6, z;
printf("%d", i+++j);
}Advertisement
Question 34hard
Determine Output:
void main()
{
int i = abc(10);
printf("%d", --i);
}
int abc(int i)
{
return(i++);
}Question 35hard
Determine Output:
void main()
{
char a[]="12345";
int i = strlen(a);
printf("%d", ++i);
}Question 36hard
Determine Output:
void main()
{
int i;
char a[]="�";
if(printf("%sn", a))
printf("Ok here n");
else
printf("Forget itn");
}