Which is the correct for() statement to run an infinite loop?

46. Which is the correct for() statement to run an infinite loop?

  1. for(;;)
  2. for(;;);
  3. for(;;)
  4. for(1;1;1)

Answer: A) for(;;)

Explanation:

The correct for statement/loop to run an infinite loop is:

for(;;)

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.