C Expressions
Description: Concept Based Questions | |
Number of Questions: 15 | |
Created by: Palash Sundaram | |
Tags: Concept Based Questions Programming - C / C++ |
What is the output of the given program?
int main()
{
printf(%d,128>>4>>3>>2);
// Line 1
}
What is the output of the given program?
int main()
{
printf(%d,128<<4<<3<<2>>6);
// Line 1
}
What is the output of the given program?
int main()
{
int x = 24;
int y = 42;
printf("%d",(~x) | (~y) );
}
What is the output of the given program?
int main()
{
int x = 24;
int y = 42;
int z = 37;
int a = 22;
printf(%d,x&y|z^a);
}
What is the output of the given code?
int main()
{
int x = 24; int y = 42;
int z = 37; int a = 22;
printf(%d,x|y|z|a );
}
What is the output of the given code?
int main()
{
printf("%d\\n",pow(128>>3>>2>>1,3));
}
What is the output of the given code?
int main()
{
int x = 24; int y = 42;
int z = 37; int a = 22;
printf("%d",x&y^z|x~a );
}
What is the output of the given code?
int main()
{
switch(printf("%d\\n",pow(128>>3>>2>>1,3))); case 56/4 :
printf("Hello"); case 32/4 : Printf("Bye"); case 0/9 :
Printf("Good"); case 0/1 : Printf("Bad");
}
What is the output of the given code?
int main()
{
switch(printf("%d\\n",pow(128>>3>>2>>1,3)))
{
case 56/4 : printf("Hello"); case 32/4 :
printf("Bye"); case 0/9 :
printf("Good"); case 0/1 :
printf("Bad");
}
}
What is the output of the given code?
int main()
{
int i=2;
int j=3;
int k=127;
printf("%h",++k>>++j<
Find out the output of the given program, if any, or find out the error. Give the answer of the program in binary language.
int main()
{
int a=7,b=15,c;
c=a|b;
printf("the result comes out to be is :- %d",c);
}
What is the output of the given code?
int main()
{
int i=2;
int j=3;
int k=127;
printf(%hx,++k>>++j<
What is the output of the given code?
int main()
{
int i = 128<<2<<1<<0;
switch(i)
{
default : printf(Bye); case 128<<4<<3<<2>>6 :
printf(\\\\nHello); case 128<<4<<2<<2>>6 :
printf(\\\\nKeep Calm); case 128<<4<<4<<2>>3 :
printf(\\\\nGet Lost);
}
}
What is the output of the given program?
int main()
{
int i = 128>>3>>2>>2; switch(i)
{
printf("Bye"); case 128<<4<<3<<2>>6 :
printf("\\nHello"); case 128<<4<<2<<2>>6 :
printf("\\nKeep Calm"); case 128>>3>>2>>9 :
printf("\\nGet Lost");
}
}
What is the output of the given code?
int main()
{
int i = 128<<4<<3<<2>>6;
switch(i) { default : printf(Bye); case 65536 :
printf(\\\\nHello); case 32 :
printf(\\\\nGood Bye); case 8/2 :
printf(\\\\nSee U Later);//Line 1
}
}