What would you like to do?

What is the syntax of for loop statement?

already exists.

Would you like to merge this question into it?

already exists as an alternate of this question.

Would you like to make it the primary and merge this question into it?

exists and is an alternate of .

syntax: for(initialization;condition;increment) { statements s1; statements s2; }
  1. include<stdio.h>
main() { int i,n=5; for(i=0;i<n;i=i+1) { printf("the number s are %d", i); } }
5 people found this useful
Thanks for the feedback!

What is the syntax for a For Loop with a counter?

  for(int i = 0; i < number; i++){ // ... Do stuff ... } A for loop behaves exactly like: int i = 0; while(i < number){ // ... Do stuff ... i++; } The fi

C program to check a for loop syntax?

//PROGRAM TO CHECK SYNTAX OF for STATEMENT #include #include #include #include void main() { FILE *fp1,*fp2; char a[100],ch,b[50]; int col=0,i=0,bra1=0,bra2=0,flag=0; clrscr()

For loop syntax in unix?

  for file in `ls $HOME/$1/`   do   echo "Print the directory : \\c"   done   for file in `ls $HOME/$1/`   do   echo "Print the directory : \\c"   don

Is an infinite loop an example of a syntax error?

No. A syntax error is a statement that fails to compile. Infinite loops are simply loops for which the number of iterations is unknown. However, all loops, whether counted loo

What is the difference between syntax and loop?

  Syntax and Loop are two completely different concepts.       A "Loop" is a programming entity.   Syntax are the rules and guidelines that define the struct

What is the syntax of the if statement?

clearly: if () or if () else In each case, can be a null statement, a single statement, or a block of statements surrounded by braces, {}.

What is the syntax of do while loop statement?

Hi The syntax of a do..while() loop is as follows: do { } while(); For example #include void main(){ int count = 5; int i = 0; do{ i++; printf("%d\
In Uncategorized

Is an infinete loop an example of syntax error?

Yes. Loops need to have a termination argument or else the program will continue running until it runs out of memory and then crash. A termination argument is some guarantee