1.

What is the return type of the millis() function?(a) Signed Long(b) Unsigned Long(c) Signed Float(d) Unsigned IntI got this question during an online interview.My question is based upon Time Functions in section Arduino Programming of Arduino

Answer»

Correct answer is (b) Unsigned LONG

To explain: The millis() function gives the up-TIME or the time since the ARDUINO started to run the program. The return type here is unsigned long, which means basically a NUMBER of the long datatype without any plus or minus SIGNS. This number denotes the up time in milliseconds.



Discussion

No Comment Found

Related InterviewSolutions