Algorithms Quiz | SP2 Contest 1 | Question 11
#include <iostream> using namespace std; int main() { int i = 256; for (;;) { cout<< "Hello World\n" ; i = i<<1; if (i<0) break ; } return 0; } |
How many times will “Hello World” be printed by the above program?
(A) 23
(B) 32
(C) 11
(D) Infinite Loop
Answer: (A)
Explanation:
Quiz of this Question