1.

How many times can a variable declared ‘const’ be fed a value in any program?(a) 1(b) 26(c) 30(d) 0This question was addressed to me in exam.Query is from Variable Scope and Qualifiers in chapter Arduino Programming of Arduino

Answer»

The correct answer is (a) 1

For explanation: Any VARIABLE declared ‘const’ at any point in a program will never be able to change it’s value THROUGHOUT the COURSE of the program. So, the programmer has to be careful to put in the APPROPRIATE correct value into the variable before declaring it as ‘const’.



Discussion

No Comment Found

Related InterviewSolutions