aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • Java and C Programming Quiz
  • int n = 0; for ( ; ; ) { if (n++ == 5) break; continue; }...
Multiple choice technology programming languages

int n = 0; for ( ; ; ) { if (n++ == 5) break; continue; } printf("x=%d\n", x); What will be printed when the sample code above is executed?

  1. 1

  2. 2

  3. 4

  4. 6

Reveal answer Fill a bubble to check yourself
D Correct answer

Keep practicing — related questions

  • int x = 0; for ( ; ; ) { if (x++ == 4) break; continue; } printf(x=%dn, x); What will be printed when the s...
  • int x = 0; for (x=1; x<4; x++); printf(x=%dn, x); What will be the output of the sample code given above?
  • What will be the output of the following: void main() { int i; for(i=1;i<=4;i++) { printf("%d",i); continue...
  • What will be printed as the result of the operation below: main() { int x=5; printf(“%d,%d,%dn”,x,x< <2,x>>...
  • What gets printed? int i = 3; if (!i) i++; i++; if (i==3) i+=2; i+=2; printf("%d\n", i);
  • What is the output of the following code fragment? int i = 10; if(i = printf(“%d”, i)) { printf(“%d ”, i); }
  • What is the output?int i = 3;if (!i) i++; i++;if (i==3) i+=2; i+=2;printf("%d\n", i);
  • int a=10,b; b=a++ + ++a; printf(%d,%d,%d,%d,b,a++,a,++a); What will be the output when following code is ex...
Play the full quiz 🎤 Practise this topic out loud

Practice this topic

  • Programming Output Evaluation (1721 questions)
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy