Top

Discussion

Point out the error, if any in the for loop.

#include
int main()
{
    int i=1;
    for(;;)
    {
        printf("%d\n", i++);
        if(i>10)
           break;
    }
    return 0;
}

 

  • A.There should be a condition in the for loop
  • B.The two semicolons should be dropped
  • C.The for loop should be replaced with while loop.
  • D.No error

Answer: D

No answer description available for this question.
 

No comment is present. Be the first to comment.
Loading…

Post your comment