1.

What is the way of throwing an error using preprocessing directives to the Arduino Compiler and forcing it to stop compilation?(a) #stop(b) #cut(c) #error(d) #warningI had been asked this question at a job interview.This interesting question is from Preprocessing topic in portion Arduino Programming of Arduino

Answer»

The correct ANSWER is (c) #error

For EXPLANATION I would say: The #error directive first THROWS an error to the ARDUINO IDE which is then DISPLAYED and then the compilation process is stopped prematurely. This is used to enable the user to stop the compilation process programmatically if some criteria or condition is not met before he or she can allow the program to start running.



Discussion

No Comment Found

Related InterviewSolutions