aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Expressions and Switch Statements
  • What is the output of the given C code? void ret(int a, i...
Multiple choice

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;
}

  1. 65536.0 12

  2. 65536.0 16

  3. 25536.012

  4. 25536.011

  5. Compiler error

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The correct output is 65536.0 12.

Keep practicing — related questions

  • 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("...
  • What is the output of the given code? int main() { switch(printf("%d\\n",pow(128>>3>>2>>1,3))) { case 56/4 ...
  • What is the output of the given code? int main() { switch(printf("%d\\n",pow(128>>3>>2>>1,3))); case 56/4 :...
  • void main(){int *x, y;y=10;x=&y; printf(Value of y=%d n, y); printf(Value of y=%d n, *x);} What is the outp...
  • What will be the output of the following C code? void main() { double t=9.0,c=78.50; float Res; Res = (t+c)...
  • What is the output of the given C code? int main() {printf( "%lf",round(hypot(4+1,9-1)));return 0;}
  • What will be the output of the following C code? void main() { int a; char *pr; int Num=288; pr=(char *)&Nu...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy