Aspire Faculty ID #16744 · Topic: AMU MCA 2025 · Just now
AMU MCA 2025

In the following program, how many times ‘for’ loop will be executed?
#include <stdio.h>
void main()
{
    int i = 5;
    for (;;)
        printf("%d", i);
}

Solution

The loop condition is for(;;) which has no condition and no termination statement. Hence the loop never stops.

Previous 10 Questions — AMU MCA 2025

Nearest first

Next 10 Questions — AMU MCA 2025

Ascending by ID
Ask Your Question or Put Your Review.

loading...