0
What is the meaning inside the for loop?
#include <stdio.h> int main() { int n,i=1; scanf("%d\n",&n); for(;;) { printf ("%d\n",i); i++; if(i>n) break; } printf ("\nDone"); return 0; }
3 Réponses
+ 5
Actually for(;;) is infinity loop. Here print i value n time, each time i value increase by 1. When the i value is greater than n the loop will break.
Set language name as tag.
0
Thanks brother. Vadivelan
0
Infinite loop .......