Is it syntactically correct to write the loop() function over the setup() function while writing an Arduino program?

Mỹ Duyên

New member
Is it syntactically correct to write the loop() function over the setup() function while writing an Arduino program?
A. No, it is not syntactically correct
B. Yes, it is syntactically correct but will result in the loop() method executing first
C. Yes, it is syntactically correct and the setup() function will execute first
D. It is syntactically correct but logically wrong
 
Answer: C
Explanation: The Arduino programming language is a subset of the C++ programming language, so therefore it supports a bottom-up approach and is an object-oriented programming language, making it irrelevant where the functions are declared.
 

Tìm kiếm

Back
Top