Hi abhishekzade,
Sorry I should have add some explanation, sometimes I thought code explains better
The micro-controller only runs the code in main function once, so anything you put into the main function will be executed at least once, in order to make your code loop and function none-stop, you could put the other code into while/for structure. So, the condition code will only run one time when power is up, and the rest of your code will be circular executed. Hopefully this will answer your question.