aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programming: Loops and Control Structures
  • What would be the output of the following statement in 'C...
Multiple choice

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<5);

  1. i=3

  2. i=3i=6

  3. i=960

  4. i=3i=5

  5. i=6i=3

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

This is the correct option as in do while statement control variable value is incremented before checking the condition.

Keep practicing — related questions

  • What will be the output of the given statement? int i=3; do { printf(%d n, i); } while(i!=0);
  • What would be the output of the following 'C' statement? void main() { int i=1, j=5; while(i<j) { printf("v...
  • What is the output?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 = 0, j = 3; while(i++<5|| j--) printf(“Hi”);
  • 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 will be the output?? int main(int c) c=1; while(1); c++; printf("%d",++c); return 0; }
  • What is the output of the following code? #include void main() { int a=0,b=0; a = (b = 75) + 9; printf("\n%...
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