Check out example codes for "how to start infinite loop in c". It will help you in understanding the concepts better.

Code Example 1

//to start infinite loop set a variable that doesnt change
int flag=1;
	//enter code here
    //type condition for when you want to end loop
    	//type code
    	//change value of flag

Learn ReactJs, React Native from