aliensbrain
  • Home
  • Study
  • Quizzes
  • 🎤AI Practicefree
  • Notebooks
  • Community
  • Sign in
  • C Programs (GATE)
  • Find the output of the following C program: Main(){int i;...
Multiple choice

Find the output of the following C program:

Main(){int i;For(;i <=10;i ++){printf(%d ”,i);}}

  1. 1 to 10

  2. 0 to 9

  3. 1 to 9

  4. Infinite loop

  5. None of these

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

Initialisation is done before for loop and all conditions in the for loop are satisfied, and the program prints values from 1 to 10.

Keep practicing — related questions

  • Find the output of the following C program: main(){int i=0;while(i++<10)printf(%d,i);}
  • Find the output of the following C program: main(){int i=0;while(++i<=10) printf(%d, i);}
  • Find the output of the following C program: Main(){int i;For(i=1;i <=10;i ++){Printf(%d ”,i);i=i+1;}}
  • Find the output of the following C program: main(){int i=2;printf(%d %d,++i,++i);}
  • Find out the output of the given program or error if any. int main(){ register int n; int i; printf(Enter t...
  • Find the output of this program. main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
  • Find the output of this program. main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
  • What is the output of the following C code? #include<stdio.h> int main() { short int i=0; for(i;++i;i>=99) ...
Play the full quiz 🎤 Practise this topic out loud
Advertisement
© Aliensbrain | all rights reserved
  • About
  • Contact
  • Terms and Condition
  • Privacy Policy