adplus-dvertising
frame-decoration

Question

How many times loop will get executed ?
#include<stdio.h>
int main()
{
    int i = 0;
    while(i <= 255)
    {
        printf("%d", i);
        i++;
    }
    return 0;
}

a.

1 Time

b.

255 Times

c.

Infinite Times

d.

256 Times

Answer: (d).256 Times

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. How many times loop will get executed ?