1.

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  

Answer»

Correct option - (A) 1

Explanation:-

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



Discussion

No Comment Found

Related InterviewSolutions