1.

What is the return type of the pulseIn() function?(a) null(b) signed byte(c) unsigned long(d) unsigned intThis question was posed to me at a job interview.Enquiry is from Advanced Input Output topic in section Arduino Programming of Arduino

Answer»

The correct CHOICE is (c) unsigned long

Easy explanation: The job of the pulseIn() function is to calculate the time difference (in MICROSECONDS) between two digital pulses. It gives the value as output in the form of an unsigned long VARIABLE. This is DONE so as to improve the accuracy of the function when MEASURING the time gap.



Discussion

No Comment Found

Related InterviewSolutions