aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Computer (NCO)
  • For (x=4,y=3; x && x!=y; x--)y++; cout<< “x...
Multiple choice

For (x=4,y=3; x && x!=y; x--)y++; cout<< “x = %d“<< x << “y = %d “<< y; returns

  1. x = 0 y = 7

  2. x = %d0 y = %d 7

  3. There is an error in the given code.

  4. x = 1 y = 5

  5. x = 6 y = 3

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

This is the right answer. 

Keep practicing — related questions

  • What is the output of the following code? int a=0; for(int I=1;I<=a;I++) cout<<I;
  • int x = 0; for (x=1; x<4; x++); printf(x=%dn, x); What will be the output of the sample code given above?
  • The output of the following code snippet is ___________ ( ) main( ) { int x=3,y,z; y=x=10; z=x<10; printf(n...
  • void main() { int x=20,y=35; x= y++ + x++; y= ++y + ++x; printf(" %d %d" , x,y); }
  • void main() { int x=20,y=35; x= y++ + x++; y= ++y + ++x; printf(" %d %d" , x,y); }
  • 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...
  • Give the output for the following: #include int g=10; void fun(int &x,int y) { x=x-y; y=x*10; cout<<x<<,<<y...
  • What does the code "cout<<(0==0);" print?
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy