Questions
What is the output of the given C code?
int main()
{
printf( "%lf",round(hypot(4+1,9-1)));
return 0;
}
- 13
- 9
- 12
- 16
- 22
What is the output of the given C code?
int main()
{
printf( "%lf",round(hypot(4+1,9-1)));
return 0;
}
- 13
- 9
- 12
- 16
- 0
What is the output of the given C code?
void ret(int a, int b)
{
double res = pow(a,b);
printf(\\\\\\\\n%d,res);
}
int main()
{
int i = (1048576>>8>>3>>4>>3);
int y = 1024>>4>>3;
ret(i,y);
printf(\\\\\\\\n%d,i^y);
return 0;
}
- 0 12
- 65536.0 16
- 25536.012
- 25536.012
- Compiler error
What is the output of the given C program?
int main()
{
int i = 1024<<8<<3>>8>>3;
switch(i)
{
default : break;
case 1048576/(34*32) : printf("Case 1");
case 1073741824/(2*32*4*32*16*8*2) : printf("Case 2");
case 1048576/(32*30*4) : printf("Case 3");
}
return 0;
}
- Case 1 Case 2 Case 3
- Case 2 Case 3
- Case 3
- No output
- Compiler error
What is the output of the given C code?
int main()
{
bool i=1;
switch(round(hypot(114,123))) // Line 1
{
default : printf("Default Case");
case 128<<6<<3 : printf("Case 1");
case 9072/54 : printf("Case 2");
case 128<<4<<2 : printf("Case 3");
}
return 0;
}
- Default Case Case 1 Case 2 Case 3
- Case 1 Case 2 Case 3
- Case 2 Case 3
- Case 3
- Compilation error
What is the output of the given C program?
int main()
{
int i = (1048576>>8>>3>>8>>3) + + - + (1024<<8<<3>>8>>3);
switch(i++) // Line 1
{
case 1024 : printf("Hello");
case 1025 : printf("How r u?");
case 512 : printf("Bye");
case 513 : printf("Bye Bye");
default : printf("Good Bye");
}
}
- Hello How r u? Bye Bye Bye Good Bye
- How r u? Bye Bye Bye Good Bye
- Bye Bye Bye Good Bye
- Bye Bye Good Bye
- Good Bye
What is the output of the given C code?
int main()
{
bool i;
if(i) switch(i++) // Line 1
{
default : printf("No Value");
case 0 : printf("\\ni is 0");
case 1 : printf("\\ni is 1");
case 2 : printf("\\ni is 2");
}
}
- No value. i is 0i is 1i is 2
- i is 0i is 1i is 2
- i is 1i is 2
- No output
- Compilation error
What is the output of the given C program?
int main()
{
int i = 1048576>>8>>3>>8>>3;
switch(i++ - 1) // Line 1
{
case "-1" : printf("Case -1");
case "1" : printf("Case 1");
default : break;
case "0" : printf("Case 0");
}
}
- Case -1 Case 1 Case 0
- Case -1 Case 1
- Case 0
- Case 1
- Compiler error
What is the output of the given C program?
int main()
{
int i= (int)round(hypot(114,123));
switch(i) // Line 1
{
default : printf("\\nDefault Case");
case 128<<6<<3 : printf("\\nCase 1");
case 9072/54 : printf("\\nCase 2");
case 128<<4<<2 : printf("\\nCase 3");
}
}
- Default Case Case 1 Case 2 Case 3
- Case 1 Case 2 Case 3
- Case 2 Case 3
- Case 3
- Compilation error
What is the output of the given C program?
int main()
{
int i = 1024<<8<<3>>8>>3;
switch(i)
{
default : printf("Default");
case 1048576/(34*32) : printf("Case 1");
case 1073741824/(2*32*4*32*16*8*2) : printf("Case 2");
case 1048576/(32*32) : printf("Case 3");
}
}
- Default Case 1 Case 2 Case 3
- Case 1 Case 2 Case 3
- Case 2 Case 3
- Case 3
- Compiler error
What is the output of the given C code?
void ret(int a, int b)
{
double res = pow(a,b);
printf("%lf",res);
}
int main()
{
int i = (1048576>>8>>3>>4>>3);
int y = 1024>>4>>3; ret(i,y);
}
- 25686.0
- 25656.0
- 65556.0
- 65536.0
- Compilation error
What is the output of the given C code?
void ret(int a, int b)
{
double res = pow(a,b);
printf("\\n%lf",res);
}
int main()
{
int i = (1048576>>8>>3>>4>>3);
int y = 1024>>4>>3;
ret(i,y);
printf("\\n%d",i^y);
return 0;
}
- 65536.0 12
- 65536.0 16
- 25536.012
- 25536.011
- Compiler error
What is the output of the given C code?
int main()
{
boolean i=1;
switch(round(hypot(114,123))) // Line 1
{
default : printf("Default Case");
case 128<<6<<3 : printf("Case 1");
case 9072/54 : printf("Case 2");
case 128<<4<<2 : printf("Case 3");
}
return 0;
}
- Default Case Case 1 Case 2 Case 3
- Case 1 Case 2 Case 3
- Case 2 Case 3
- Case 3
- Compilation error
What is the output of the given C program?
int main()
{
int i = 1024<<8<<3>>8>>3;
switch(i)
{
default : printf("Default");
case 1048576/(34*32) : printf("Case 1");
case 1073741824/(2*32*4*32*16*8) : printf("Case 2");
case 1048576/(32*32) : printf("Case 3");
}
return 0;
}
- Default Case 1 Case 2 Case 3
- Case 1 Case 2 Case 3 is incorrect
- Case 2 Case 3
- Case 3
- Compiler error
What is the output of the given C code?
void ret(int a, int b)
{
double res = pow(a,b);
printf("%d",res);
}
int main()
{
int i = (1048576>>8>>3>>4>>3);
int y = 1024>>4>>3;
ret(i,y);
}
- 25686.0
- 25656.0
- 0
- 65536.0
- Compilation error
What is the output of the given C program?
int main()
{
int i = 1048576>>8>>3>>8>>3;
switch(i++ - 1) // Line 1
{
case -1 : printf("Case -1");
case 1 : printf("Case 1");
default : break;
case 0 : printf("Case 0");
}
return 0;
}
- Case - 1 Case 1
- Case - 1 Case 1 Case 0
- Case 0
- No output
- Error at Line 1
What is the output of the given C code?
int main()
{
int i;
switch(i) // Line 1
{
default : printf("No Value\\n");
case 0 : printf("i is 0\\n");
case 1 : printf("i is 1");
}
return 0;
}
- No value. i is 0i is 1
- i is 0i is 1
- i is 1
- No output
- Compilation error
What is the output of the given C program?
int main()
{
int i = 1048576>>8>>3>>8>>3;
switch(1 + i++ - 1) // Line 1
{
case 0 : printf("\\n%d",1024<<8<<3>>8>>3);
case -1 : printf("\\n%d",1024<<2>>3<<2);
default : break;
case 1 : printf("\\n%d",1024<<3<<8>>3>>3);
}
return 0;
}
- 32768
- 10242048
- 2048
- No output
- Error at Line 1
What is the output of the given C program?
int main()
{
int i = (1048576>>8>>3>>8>>3) + + - + (1024<<8<<3>>8>>3);
switch(i) // Line 1
{
default : printf("Good Bye");
case 1024 : printf("\\n%d\\n",1024<<8<<3>>8>>3);
case 512 : printf("%d\\n",1024<<2>>3<<2);
case 1 : printf("%d\\n",1024<<3<<8>>3>>3);
}
return 0;
}
- Good Bye 1024 2048 32768
- 1024 2048 32768
- 2048 32768
- 32768
- Compilation error