Endless loops are also referred to as infinite loops. How to loop endlessly but on purpose. Occasionally, a program needs an endless loop. For example, a microcontroller may load a program that runs as long as the device is on. When you set up such a loop on purpose in C, one of two statements is used: for(;;) Read this statement as “for ever.” With no items in the parentheses, but still.