Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

101.

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’.

102.

If a program has 4 functions then will all of them be able to access the data held by a global variable?(a) Yes(b) NoThis question was addressed to me in exam.The question is from Variable Scope and Qualifiers topic in division Arduino Programming of Arduino

Answer»

The correct answer is (a) Yes

Easy explanation: Any GLOBAL variable when defined in a PROGRAM automatically is open for all functions present in the program to access and perform read or WRITE OPERATIONS. On the contrary any variable defined within the SCOPE of a function, will only be able to be accessed within the function itself.

103.

Which of these functions are used to partially or fully substitute a string?(a) replace()(b) size()(c) subs()(d) substring()This question was posed to me in an online quiz.I would like to ask this question from String Manipulation topic in portion Arduino Programming of Arduino

Answer»

Right answer is (a) replace()

BEST explanation: The replace FUNCTION works with 3 arguments; the index in the SOURCE string, the string to be substituted with, and the string variable. It can be USED as “str.replace(a,b, “hello”);” where ‘b’ characters are REPLACED from index ‘a’ in ‘str’.

104.

How many arguments does the back() function take?(a) 0(b) 1(c) 2(d) 3This question was posed to me in an internship interview.My doubt is from String Manipulation in chapter Arduino Programming of Arduino

Answer»

Correct CHOICE is (a) 0

The explanation: The back() FUNCTION returns a character from the string given as input. It takes in no arguments. It returns the last character that is PRESENT in the string. It can be USED as “cout<

105.

What is the overflow point of the millis() function?(a) 10 day(b) 30 days(c) 50 days(d) 70 daysI have been asked this question by my school teacher while I was bunking the class.My question is taken from Time Functions in division Arduino Programming of Arduino

Answer» RIGHT option is (C) 50 days

To explain I WOULD say: The millis() function gives the up-time or the time since the Arduino started to run the program. The overflow point of this function is 50 days. This means that the value RETURNED by this function will return to 0 after 50 days.
106.

What is the purpose of the

Answer» CORRECT answer is (c) Bitwise Left Shift

The BEST I can explain: The << operator takes two numbers as operands. Then it SHIFTS the bits of the first operand by the value present in the second operand from right to left. The second operand however has to be a number less than 32 only. Otherwise the operation will not work.
107.

What is the function of the readBytesUntil() function?(a) Reads only integers from a stream(b) Reads any characters from a stream(c) Reads only special characters from a stream(d) Tokenizes a string from a streamThe question was asked in an interview.This key question is from Serial and Stream Communications in section Arduino Programming of Arduino

Answer» CORRECT choice is (b) READS any characters from a stream

Easy explanation: The readBytesUntil() function belongs to the Stream class. It is USED for reading any characters from a stream. The function continues to read characters entered until the termination character is found. It then puts all the collected DATA into a buffer.
108.

How many arguments does the analogRead() function have?(a) 1(b) 2(c) 3(d) 4The question was asked in final exam.This key question is from Analog Input Output topic in division Arduino Programming of Arduino

Answer»

The correct answer is (a) 1

For EXPLANATION: The analogRead() function is used to take analog signal inputs to the Arduino. It requires 1 argument; the PIN number which WOULD indicate which pin is to be used for that particular OPERATION. This will make the Arduino to start reading voltage fluctuations of the ORDER of 0V to 5V or 3.3V for some Arduino Boards.

109.

Can the digitalWrite() function be used from any analog pin?(a) No, it cannot(b) Yes, it can, but only on certain Arduino Boards(c) Yes, it can(d) Yes, it can, but only through certain pinsThis question was addressed to me by my school teacher while I was bunking the class.I need to ask this question from Digital Input Output in portion Arduino Programming of Arduino

Answer»

The correct option is (b) Yes, it can, but only on certain ARDUINO BOARDS

The explanation: The pins in the Arduino Boards are all DIGITAL by default. The analog functionality is an addon to the board with the help of an ADC (Analog to Digital Convertor) Circuit, or a DAC (Digital to Analog Convertor) Circuit. Thus, all analog pins SUPPORT digital IO but not all digital pins support analog IO. However, this is an exception in the Arduino Nano, Mini and Pro Mini.

110.

How many architectures does the Arduino subfolder in the Hardware section contain?(a) 2(b) 3(c) 4(d) 9I got this question in an interview for internship.My doubt is from Compilation topic in section Arduino Programming of Arduino

Answer»

The correct choice is (a) 2

For explanation I would say: The ARDUINO subfolder of the Hardware section CONTAINS support for 2 architectures; AVR and SAM. The AVR Microcontrollers are included in the most common Arduino BOARDS like the Uno, Nano, Mega, etc. However, some Arduino Boards like the Arduino Due don’t use AVR but use the SAM 32-bit ARM PROCESSORS.

111.

What are the two modes that the pinMode() method sets for a particular pin?(a) DIGITAL and ANALOG(b) INPUT and OUTPUT(c) TX and RX(d) READ and WRITEThis question was addressed to me by my school teacher while I was bunking the class.My doubt stems from Setting Pin Mode in section Arduino Programming of Arduino

Answer»

Right choice is (B) INPUT and OUTPUT

The best I can explain: The pinMode() method determines whether the pin number given in the code is to be USED as an input pin WHEREIN it can read voltage from an external CIRCUIT or for setting a particular voltage at the pin output to be plugged to an external circuit.

112.

What is the maximum number of arguments for the constrain() function?(a) 1(b) 2(c) 3(d) 4This question was addressed to me in a national level competition.This question is from Mathematical Functions in section Arduino Programming of Arduino

Answer»

The correct answer is (c) 3

For EXPLANATION: The constrain() FUNCTION is used to restrict the output from going below or above a certain minimum or maximum number respectively. It takes THREE ARGUMENTS; the number to be contrained, the minimum value, and the maximum value.

113.

Which of the following boards does the WifiNINA Library work on?(a) Arduino MKR 1010(b) Arduino Due(c) Arduino MKR VIDOR 3000(d) Arduino MicroI have been asked this question by my college director while I was bunking the class.My question is from Other Libraries topic in chapter Arduino Programming of Arduino

Answer»

The correct choice is (a) Arduino MKR 1010

The explanation: The library enables the Wi-Fi CAPABILITIES of the Arduino MKR 1010 BOARD. It can be also used as a server to ACCEPT incoming connections and EVEN send outgoing requests. It also supports WEP and WPA2 Encryption Systems.

114.

What library is to be required for manipulating audio on the Arduino Due?(a) AudioMan.h(b) PulseAudio.h(c) Audio.h(d) Sound.hThis question was addressed to me in a job interview.My doubt stems from Other Libraries topic in portion Arduino Programming of Arduino

Answer»

Right answer is (c) Audio.h

Explanation: The ARDUINO Due uses the Audio.h library for manipulation of sounds. It allows the Arduino Due to USE the DAC0 and DAC1 pins to open .wav audio files from a source. Most of the time this library is used with the SD.h standard library to enable the Arduino Due to be able to READ audio files from SD Cards.

115.

What is the purpose of the MKRNB Library?(a) Connecting to the internet over GSM(b) Connecting to the internet over Ethernet(c) Connecting to the internet over Wi-Fi(d) Connecting to the internet over LANI have been asked this question in an international level competition.This key question is from Other Libraries in portion Arduino Programming of Arduino

Answer»

Right CHOICE is (a) Connecting to the INTERNET over GSM

Explanation: The MKRNB LIBRARY runs on the Arduino MKR NB 1500 and helps in connecting the board to the internet via GSM. The board CONSISTS of a modem that takes the data from the serial port of the board and then sends it to the internet via the GSM Network with the help of AT commands.

116.

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.

117.

How to view each command that gets executed during the compilation process?(a) Enable Verbose Output(b) Disable Verbose Output(c) Show Sketch Folder(d) Open Serial PlotterThe question was posed to me in class test.The above asked question is from Compilation topic in chapter Arduino Programming of Arduino

Answer»

Right answer is (a) ENABLE Verbose Output

To elaborate: A verbose is a feature that reports all information in a PROCESS, function or code. The Arduino Verbose Output helps in displaying the output for each EXECUTION STEP in the Arduino Compilation Process.

118.

What compiler toolchain is used to compile the Arduino Sketches?(a) AVR-G++/GCC(b) Python(c) PowerShell(d) PerlI have been asked this question in an interview for internship.The above asked question is from Compilation topic in portion Arduino Programming of Arduino

Answer»

The correct option is (a) AVR-G++/GCC

Easy explanation: The AVR-GCC/G++ software is a compiler which can TAKE C/C++ CODE as INPUT and translate or compile it into Binary Code that FOLLOWS the instruction set for the AVR Microcontrollers. They’re used in the Arduino software since most Arduino Boards USE the AVR Microcontroller family.

119.

Arduino Codes are referred to as ________ in the Arduino IDE.(a) drawings(b) notes(c) sketches(d) linksI had been asked this question in an online quiz.My query is from Programming in division Arduino Programming of Arduino

Answer»

Right answer is (C) sketches

The explanation is: Any Arduino CODE that is saved using the Arduino IDE, is referred to as a “sketch” by the Arduino IDE. These “sketches” are NOTHING but the code saved in a file with the extension name being “.INO”.

120.

Can you run an Arduino code in Raspberry Pi or any other microcontroller or embedded system?(a) Yes(b) NoThe question was asked during an online interview.This interesting question is from Programming in division Arduino Programming of Arduino

Answer»

Right choice is (b) No

The explanation: The ARDUINO code uses a lot of pre-built libraries that are specific to the Arduino PLATFORM and would CERTAINLY not work on any other platform. However, one can remove the lines of code containing the prebuilt libraries from their code and use the code to run on any other C++ platform performing other minor MODIFICATIONS to the code, SINCE the original Arduino code is after all based on C++.

121.

What is the use of the typeid() function?(a) To find the datatype of the variable(b) To find the “const” status of the variable(c) To find the address of the variable(d) To find the value of the variableThe question was posed to me in an online quiz.This intriguing question comes from Type Conversions in section Arduino Programming of Arduino

Answer»

The CORRECT choice is (a) To find the datatype of the variable

Explanation: The typeid() function returns the datatype of the expression or variable that is PASSED through it. It returns a constant type_info OBJECT which can be used as a STRING in further programming.

122.

What is the use of the sin() function?(a) To find the sine of a number(b) To find the cosine of a number(c) To find the tan of a number(d) To find the inverse tan of a numberI have been asked this question during an interview.Question is from Mathematical Functions topic in chapter Arduino Programming of Arduino

Answer»

Correct answer is (a) To FIND the SINE of a number

To explain: The sin() function is used to find the sine of a number. It takes ONE argument; the number whose sine is to be found out. This number is to be entered in the RADIAN format and not the degree format. This function can accept the float datatype and gives the output in the double datatype.

123.

What method does the int datatype use for storing negative numbers?(a) 1’s Complement(b) 2’s Complement(c) 3’s Complement(d) 4’s ComplementThis question was posed to me during a job interview.The above asked question is from Datatypes topic in chapter Arduino Programming of Arduino

Answer»

The correct answer is (b) 2’s Complement

To elaborate: The int DATATYPE STORES 16 bits of data. The way it handles negative numbers is by a method called the 2’s complement WHEREIN a sign bit is added to the binary equivalent of the number and then all the bits are INVERTED and then added by one.

124.

Can the Arduino read sensor data from a pin while the delay() function is in effect?(a) Yes(b) NoThis question was addressed to me in an international level competition.The origin of the question is Time Functions in portion Arduino Programming of Arduino

Answer»

Correct ANSWER is (b) No

Explanation: The delay() function is USED to suspend OPERATIONS for a specified amount of time. This is really handy for certain operations like viewing data on the SERIAL Monitor. However, this has a very serious drawback; it suspends ALL operations during this time, i.e. no mathematical calculations, no sensor data INPUTS, etc. for the time it is in effect.

125.

Can an infinite loop be dangerous to embedded systems due to memory leak?(a) Yes(b) Yes, but only if it is used within a limited scope(c) No(d) Yes, but only for some Arduino BoardsThe question was asked during an interview for a job.This is a very interesting question from Looping topic in portion Arduino Programming of Arduino

Answer»

Correct answer is (a) Yes

The explanation: Infinite loops are a good way to ensure that your PROGRAM is running continuously WITHOUT any interruptions. However in programming languages that allow raw memory MANAGEMENT, it’s very easy to have a memory leak, or a continuous allocation of memory which eventually leads to the programming using all the memory AVAILABLE and eventually crashing the ENTIRE system.

126.

What is the resolution of the micros() function on the Arduino Nano?(a) 2 Microseconds(b) 3 Microseconds(c) 4 Microseconds(d) 5 MicrosecondsI had been asked this question by my college director while I was bunking the class.This is a very interesting question from Time Functions topic in section Arduino Programming of Arduino

Answer»

Right answer is (c) 4 Microseconds

Easiest explanation: The micros() function gives the up-time of the Arduino program in microseconds. This function has a resolution, i.e. the intervals in which it gives an output. This resolution DEPENDS on the FREQUENCY of the specific Arduino Board that its RUNNING on. On the Arduino Duemilanove it’s resolution is 4 Microseconds.

127.

What is the function of the Scheduler Library?(a) To allow queueing of functions(b) To allow for cancelling of functions(c) To allow for parallel execution of functions(d) To allow for serial initialization of functionsI have been asked this question in my homework.The doubt is from Other Libraries in division Arduino Programming of Arduino

Answer»

Correct choice is (c) To allow for parallel execution of FUNCTIONS

Easiest explanation: The Scheduler Library works only on the ARDUINO ZERO, Due, etc. and other Arduino Boards having SAM and SAMD architectures. It allows for parallel running of functions without using interrupt. It allows the CPU to switch seamlessly between TASKS.

128.

Which interface does SD.h depend on for communication between the SD Card Module and the Arduino?(a) SPI(b) I2C(c) USB(d) TTLI have been asked this question in semester exam.This interesting question is from Standard Libraries topic in section Arduino Programming of Arduino

Answer»

The correct answer is (a) SPI

Explanation: The SD.h library for COMMUNICATION between SD Card Modules and Arduinos use SPI (Serial Peripheral Interface) for ESTABLISHING communications. The SPI is a synchronous Serial Communication Protocol which is USED for short distance communications between microcontrollers and devices like SD Card READERS, shift RESISTORS, etc.

129.

Can the analogRead() function be used from any digital pin?(a) No, it cannot(b) Yes, it can, but only on certain Arduino Boards(c) Yes, it can(d) Yes, it can, but only through certain pinsI had been asked this question in class test.Question is from Analog Input Output in division Arduino Programming of Arduino

Answer»

The correct ANSWER is (d) Yes, it can, but only through certain pins

The BEST explanation: The pins in the Arduino Boards are all digital by default. The analog functionality is an addon to the BOARD with the HELP of an ADC (Analog to Digital Convertor) Circuit which is only connected to a certain number of digital pins, so therefore not all pins can SUPPORT analog communications.

130.

What is the use of the analogReference() function?(a) To change the digital signal reference value(b) To change the analog signal reference value(c) To print the analog signal reference voltage(d) To print the digital signal reference voltageThe question was asked in my homework.This is a very interesting question from Analog Input Output topic in portion Arduino Programming of Arduino

Answer»

The correct answer is (b) To change the analog signal reference value

The explanation: The ANALOGREFERENCE() function changes the value of the internal reference voltage for all analog CALCULATIONS in the Arduino Board. For the function to work properly we need to supply the desired voltage LEVEL to the AREF pin on the Arduino Board physically before invoking the function. However, any voltage GREATER than 5V is not recommended since it can DAMAGE the board.

131.

Can a programmer not use the loop function at all in a code?(a) Yes(b) No(c) Yes, but it needs to be called at least once(d) Yes, but it needs to be commented outThis question was posed to me in an international level competition.I would like to ask this question from The loop() Function topic in division Arduino Programming of Arduino

Answer»

The correct ANSWER is (a) Yes

To explain: The LOOP function is a custom PREDEFINED function that was designed to execute code over and over again for the Arduino. However if a programmer can replicate that same functionality in his/her code without the USE of the loop() function then there is compulsion for him/her to INCLUDE the loop() function in the program.

132.

Which software is used to upload the Arduino Sketches to the board?(a) avrdude(b) avrgcc(c) g++(d) cpython for windowsThe question was asked in quiz.This key question is from Uploading in section Arduino Programming of Arduino

Answer»

Right answer is (a) AVRDUDE

The best I can explain: The AVR-GCC/G++ software is a compiler which can take C/C++ code as input and TRANSLATE or compile it into BINARY Code that follows the instruction set for the AVR MICROCONTROLLERS. After that process is done, the avrdude software has the job of uploading the hex file to the microcontroller, more specifically the AVR Microcontroller family.

133.

Is the Arduino programming language a general-purpose language?(a) Yes(b) NoI had been asked this question in an online quiz.The above asked question is from Programming in section Arduino Programming of Arduino

Answer»

The CORRECT choice is (b) No

Best explanation: The Arduino language is a modified version or subset of the C++ PROGRAMMING language. Hence EVEN if the C++ programming language is a general-purpose programming language, due to the inclusion of certain SPECIFIC libraries in the subset, the Arduino code cannot run on any other embedded system other than another Arduino BOARD, thus making the programming language platform specific.

134.

What is the correct execution process of an Arduino code.(a) Editor->Compiler->Preprocessor(b) Editor->Preprocessor->Compiler(c) Preprocessor->Editor->Compiler(d) Compiler->Preprocessor->EditorThis question was posed to me in an interview.Question is taken from Preprocessing topic in chapter Arduino Programming of Arduino

Answer»

Right choice is (B) Editor->Preprocessor->Compiler

The best I can explain: The code that is written is FIRST DONE so with the help of the editor. WITHOUT the editor there will be no place where the programmer can write his or her code. After that the code is handed over to the preprocessor and finally the compiler which translates the code into the ARDUINO’s Assembly Instruction Set.

135.

Which of the sizes of data given below require us to shut off all interrupts while inputting them into a volatile variable?(a) 1 bit(b) 2 bit(c) 2 bytes(d) 0.5 bytesI got this question by my school teacher while I was bunking the class.The above asked question is from Variable Scope and Qualifiers topic in chapter Arduino Programming of Arduino

Answer»

Correct option is (C) 2 bytes

For explanation I would say: The volatile keyword has a LOT of uses and advantages in programming. However, when it COMES to inputting large quantities of data, ANYTHING more than a bit in size will definitely result in the formation of garbage values. So, in order to input that kind of data we need to shut off all interrupts before inputting the VALUE.

136.

Is there any difference between the usage of the size() and the length() function?(a) Yes(b) NoThis question was posed to me in an interview for internship.My question comes from String Manipulation in section Arduino Programming of Arduino

Answer»

Right ANSWER is (b) No

Easy explanation: The SIZE() and LENGTH() FUNCTIONS both return the number of characters that constitute the string given and can be USED interchangeably from a utilitarian standpoint. There is absolutely no difference between the two functions.

137.

What is the name of the control structure used to stop any loop prematurely and only exit out of the loop, not affecting the running of the rest of the program?(a) The continue statement(b) The break statement(c) The exit statement(d) The purge statementThis question was posed to me in an international level competition.This interesting question is from Control Structures in section Arduino Programming of Arduino

Answer»

The correct answer is (b) The BREAK statement

To ELABORATE: From all the above options only the break statement is generally USED for exiting loops. This can be also applied for switch case control structures. The difference between the break statement and the exit statement is that the break statement can only ABORT looping control structures, but the exit statement completely aborts the program execution.

138.

What datatype should one use to represent 2147483610?(a) Int(b) Byte(c) Short(d) LongI got this question in class test.I'm obligated to ask this question of Datatypes in section Arduino Programming of Arduino

Answer»

Correct choice is (d) Long

The best I can explain: Any NUMBER can be represented in the form of a whole number or a floating-point number. If it must be represented as a whole number, then there are many OPTIONS depending upon the size of the number in question. Here the number 2146492440 should be represented USING the long datatype since it has a range of -2147483648 to -2147483647.

139.

What is the name of the ^ operator?(a) Bitwise XNOR(b) Bitwise NAND(c) Bitwise XOR(d) Bitwise ANDI have been asked this question during an online interview.My enquiry is from Operators topic in portion Arduino Programming of Arduino

Answer»

Correct choice is (c) BITWISE XOR

For explanation I WOULD say: The ^ operator is used to perform a bitwise XOR operation on any two NUMBERS which serve as the operands. It performs an XOR operation on each bit starting from the most significant bit to the LEAST significant bit.

140.

Which of the following Arduino Boards does the USBHost Library work on?(a) Arduino Nano(b) Arduino Due(c) Arduino Uno(d) Arduino MicroThis question was addressed to me during an internship interview.My question comes from Other Libraries topic in section Arduino Programming of Arduino

Answer»

Right option is (b) Arduino Due

Easy explanation: The USBHost LIBRARY was developed for the Arduino Due. This library allows the Arduino Due to appear as a USB HOST and connect to external peripherals like the MOUSE and keyboard. HOWEVER this does not include device connected through USB Hubs.

141.

After the compilation process, the file containing the assembly instructions for the microcontroller is stored in a file. What is the file type?(a) .o(b) .hex(c) .cpp(d) .hppI had been asked this question in a job interview.My doubt is from Compilation topic in division Arduino Programming of Arduino

Answer»

Right answer is (B) .hex

The best explanation: The assembly instructions for the microcontroller is STORED in a hex file. This file contains the assembly instructions in hex format for the microcontroller to understand and execute. It is the binary executable file that ALLOWS us to execute the high-level C CODE on any microcontroller.

142.

What is the use of the Arduino.h header file?(a) It gives root access to the microcontroller’s file system(b) It enables the programmer to access all of Arduino’s core functionality(c) It allows other people to create libraries for the Arduino code(d) It doesn’t have any use and can be omitted at any point of time in the codeI had been asked this question during an online exam.My query is from Compilation in portion Arduino Programming of Arduino

Answer»

Right answer is (b) It enables the programmer to ACCESS all of Arduino’s core functionality

The explanation is: The Arduino.h file is not something that we encounter during the process of WRITING the code for the Arduino board because the preprocessor takes care of it before COMPILATION. However, it is a very important file without which we cannot access the Arduino’s features like GPIO IO, Analog IO, etc.

143.

What language is the Arduino IDE built on?(a) C/C++(b) Python(c) HTML(d) JavaI have been asked this question in an internship interview.Question is taken from Programming topic in portion Arduino Programming of Arduino

Answer»

The correct choice is (d) Java

To EXPLAIN I would say: The Arduino code is primarily a subset of the C++ programming language. HOWEVER, the IDE (Integrated Development Environment) was WRITTEN in the Java programming language. An IDE is a software that provides primarily a graphical user interface for COMPILING and maintaining/editing code for a platform.

144.

What type of variables does the PROGMEM Utility work on?(a) Globally Defined or static(b) Defined inside a function and non-static(c) Defined inside a for-loop and non-static(d) Defined inside a while-loop and non-staticI had been asked this question in class test.The above asked question is from PROGMEM Utility in section Arduino Programming of Arduino

Answer»

Right answer is (a) Globally DEFINED or static

Explanation: The PROGMEM Utility can only be USED for variables which have “public” access to the entire program and conversely can be accessed by anyone, or is a static VARIABLE, which means they NEED to be defined outside a function and be static or non-static, or if they are defined WITHIN any function, they need to be static.

145.

What function will we use to find out the number of elements in an array?(a) sizeof()(b) size()(c) sf()(d) sizeOf()This question was addressed to me during an online interview.My question is from The sizeof() Function topic in chapter Arduino Programming of Arduino

Answer»

Correct CHOICE is (a) sizeof()

Best explanation: The primary use of the sizeof() function is to RETURN the length or size of an element that is given to it. So, if this element is an array which is a collection of ELEMENTS, it will GIVE the NUMBER of elements present inside the array.

146.

What is the equivalent macro for the PROGMEM Utility when dealing with sending data that is to be printed, into the Flash memory?(a) A() Macro(b) C() Macro(c) F() Macro(d) N() MacroI had been asked this question during an online exam.My question is from PROGMEM Utility topic in section Arduino Programming of Arduino

Answer»

Correct answer is (C) F() Macro

To explain: The F() macro is USED for sending data, which is usually in the form of strings that are declared within the Serial.print() function which MEANS they are not to be stored ANYWHERE in the program but are to be printed onto the serial MONITOR, to the Flash Memory before it is printed.

147.

What is the math function to find out the minimum of 2 numbers?(a) The min() function(b) The minimum_number() function(c) The m() function(d) The minimumOf() functionThe question was posed to me in an interview for internship.My question is taken from Mathematical Functions in division Arduino Programming of Arduino

Answer»

Right answer is (a) The min() function

Explanation: The min() function takes in 2 arguments and outputs only 1 NUMBER. This function finds out the minimum of the 2 numbers that are entered as arguments to the function. This function is ESSENTIAL in SORTING techniques.

148.

Is there a difference between iteration and recursion?(a) Yes(b) No(c) Yes, but only in some programming languages(d) Yes, but it depends on the version of programming language usedThe question was asked in an interview for internship.The question is from Looping topic in chapter Arduino Programming of Arduino

Answer»

Right option is (a) Yes

The explanation: Iteration is the method of executing a SET of statements repeatedly with the use of looping control structures LIKE the for-loop, while-loop, do-while loop, etc. while recursion does the same THING but without USING any looping control structures. It uses function call statements.

149.

What is the default time limit that is set automatically if no value is passed as the limit to the setTimeout() function?(a) 100 milliseconds(b) 1500 milliseconds(c) 1000 milliseconds(d) 2432 millisecondsThis question was addressed to me at a job interview.My question is from Serial and Stream Communications topic in chapter Arduino Programming of Arduino

Answer»

Right answer is (c) 1000 milliseconds

The best I can explain: The default TIME limit is set to 1000 milliseconds before the setTimeout() will wipe the data from the BUFFER if no time limit is PROVIDED externally. This FUNCTION has no return data type, and can be invoked from a host of FUNCTIONS.

150.

On which of the following Arduino Boards does the analogReadResolution() function not work?(a) Arduino Zero(b) Arduino MKR Vidor 4000(c) Arduino Due(d) Arduino UnoI got this question during an online exam.This interesting question is from Analog Input Output in section Arduino Programming of Arduino

Answer»

Correct answer is (d) Arduino Uno

The explanation: The ANALOGREADRESOLUTION() function is used to change the resolution of the ADC for READING a particular voltage and mapping it to the number set. The resolution of the ADC is the number of levels up to which the ADC can quantize the analog SIGNAL. The Arduino Uno is not CAPABLE of executing that COMMAND.