1.

How to make the loop function run only once but the code inside run infinitely?(a) Create a recursive function call statement(b) Create a nested infinite loop within the loop() function(c) Call the setup() function from the loop() function(d) Call the loop() function from the setup() functionI had been asked this question in unit test.I need to ask this question from The loop() Function topic in section Arduino Programming of Arduino

Answer»

Correct choice is (b) Create a nested infinite loop within the loop() function

To explain I WOULD say: Yes, it is POSSIBLE to make the loop() function EXECUTE only once while running the code infinitely. This can be done by using an infinite loop within the loop() function so that the code never goes out of the loop and THUS never allowing the loop() function to iterate.



Discussion

No Comment Found

Related InterviewSolutions