aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming: Loops and Control Structures
  • What will be the output of the given statement? int i=3; ...
Multiple choice

What will be the output of the given statement? int i=3; do { printf(%d n, i); } while(i!=0);

  1. 3 210

  2. 3 1 20

  3. 3012

  4. 321

  5. 1230

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

This is the correct output for the above statement as the value of i is displayed until it becomes less than 1.

Keep practicing — related questions

  • What would be the output of the following statement in 'C'? int i=0; do { i=i+3; printf(n i=%d,i); }while(i...
  • What will be the output of the following: void main() { int i; for(i=1;i<=4;i++) { printf("%d",i); continue...
  • What is the output?int i = 3;if (!i) i++; i++;if (i==3) i+=2; i+=2;printf("%d\n", i);
  • i=3; Printf("%d%d%d",i++,++i,i); What will be output of the code snippet?
  • What will be the output of the following program : void main() { int i, n =10; for (i=1; i
  • What would be the output of the following statement? int x=30;int y=5;while(x!=0){ if(x%y==0) printf(n Valu...
  • main() { int i=3; printf(Value of i=%d,*(&i)); } Give the output of above program.
  • What gets printed? int i = 3; if (!i) i++; i++; if (i==3) i+=2; i+=2; printf("%d\n", i);
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