C MCQ - Standard Input & Output
21. What is the output of the following code?
int main() {
int i=1;
i=2+2*i++;
printf("%d",i);
return 0;
}
View Answer
22. What is the output of the following code?
main ( )
{
int i;
i=1;
i=i+2*i++;
printf( "%d" , i);
}
View Answer
23. What is the output of this program?
main()
{
int i;
i = 2+3, 4>3, 1;
printf( "%d" , i);
}
View Answer
24. What is the output of this program?
main ()
{
int i=5;
printf( "%d %d %d " , i,i<<2,i>>2);
}
View Answer
25. What is the output of this program?
main ( )
{
int i=5;
printf( "%d %d %d " , i,i<<2,i<<2);
}
View Answer
26. What is the output of this program?
int main()
{
int i=5;
printf( "%d %d %d " , i,i<2,i>2);
return 0;
}
View Answer
27. What is the output of this program ?
int main()
{
int i=5;
printf( "%d %d %d " , i,i&&2,i||2);
return 0;
}
View Answer
28. What is the output of this program ?
int main()
{
int i=5;
printf( "%d %d
" , i,i|2);
return 0;
}
View Answer
29. What is the output of this program 32 bit c compiler ?
int main()
{
int i=1;
i=i+i*i++;
printf("%d",i);
return 0;
}
View Answer
30. What is the output of this program ?
int main()
{
int i=-2;
i=i+i*i++;
printf("%d",i);
return 0;
}
View Answer
Also check :