1.

Can the loop() function be used to call another function that is custom defined by the programmer?(a) Yes, it can call(b) No, it cannot call(c) Yes, it can call but only functions with no return values(d) Yes, it can call but only functions with return valuesThis question was addressed to me during an internship interview.My question is taken from The loop() Function topic in division Arduino Programming of Arduino

Answer»

Correct option is (a) YES, it can call

The explanation is: In C/C++ Programming, a FUNCTION can call any other function WHETHER it be the MAIN function or any other custom defined function. In the case of the Arduino, the setup() and the loop() functions are custom predefined functions that are a part of the Arduino programming language subsystem.



Discussion

No Comment Found

Related InterviewSolutions