Computer Science, asked by shaliniojha23, 8 months ago

How many times hello will print?
#include
int main(void)
{
int i;
for(i=0;i<5;i++);
printf("hello");
}​

Answers

Answered by sanish
0

Answer:

5 times

Explanation:

Since the loop starts from i=0, it will go upto the condition i<5. It means that, "hello" will be printed for i=0,1,2,3,4. Until the value of i is reached at 5, i<5 will have truth value False. And loop will break at that moment. So "hello" will be printed 5 times.

Hope that helps. : )

Similar questions