Can the setup() function change the value of constant variables?

Trang Mắm

New member
Can the setup() function change the value of constant variables?
A. Yes, it can change
B. No, it cannot change
C. Yes, it can change but only integer values
D. Yes, it can change but only byte values
 
Answer: B
Explanation: In C/C++ Programming, once a constant is declared and initialized, its value cannot be further altered throughout the entire lifecycle of the program. Thus here the setup() function also follows through the same rule since the Arduino Programming Language is a working subset of the C++ Programming Language.
 

Tìm kiếm

Back
Top