+2 votes
in Mathematics by kratos

How many times the following code prints the string “hello”

for(i=1; i<=1000; i++);

printf(“hello”);

(A) 1

(B) 1000

(C) Zero

(D) Syntax error

1 Answer

+4 votes
by kratos
 
Best answer

Correct option -**(A) 1**

Explanation:-

The “for” loop is terminated by a semicolon so the next statement is *** that is printing hello.

...