1.

What happens to the output if the analogReadResolution() function is invoked with a resolution higher than the board’s ADC can physically handle?(a) The output is padded with zeros(b) The output is not obtained as an error is thrown during compile time(c) The output is not obtained as an error is thrown during run time(d) The output is padded with onesThe question was asked during an interview.My query is from Analog Input Output in portion Arduino Programming of Arduino

Answer»

Right OPTION is (a) The output is padded with zeros

For explanation I would say: If the value PASSED as an argument to the ANALOGREADRESOLUTION() function is higher than the physical capability of that PARTICULAR board’s ADC, then the output is padded with zeros so as to enable other boards EQUIPPED with ADC’s having higher resolutions can process the data.



Discussion

No Comment Found

Related InterviewSolutions