Multiple Choice Question

Quiz Guidelines

 

QID: 
472
Question: 

Which of these for statements are valid?

1. for (int i=5; i=0; i--) { }
2.  int j=5;
      for(int i=0, j+=5;  i<j ; i++) {  j--;  }
3. int i, j;
    for (j=10; i<j; j--) { i += 2; }
4. int i=10;
    for ( ; i>0 ; i--) { }
5. for (int i=0, j=10; i<j; i++, --j) {;}

Select 1 option

A. 1, 2
B. 3, 4 
C. 1, 5
D. 4, 5 
E. 5

Q&A Set: