Google News
logo
Embedded C - Interview Questions
How do you write code for an infinite loop?
An infinite loop is the main component of an embedded application, which is used to run an application all time, an infinite loop can be coded by using while (1) and for(;;)
 
Syntax for an infinite loop by using while(1)
while(1)
    {
	    ...;
	    ...;
    }
 
Syntax for an infinite loop by using for(;;)
for(;;)
    {
	    ...;
	    ...;
    }
Advertisement