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.

51.

Is there any difference between exit-controlled loop structure and entry-controlled loop structure?(a) Yes(b) NoI had been asked this question during an interview.I would like to ask this question from Looping topic in division Arduino Programming of Arduino

Answer»

Right option is (a) Yes

Explanation: The minimum number of times an entry-controlled LOOP will run if the condition FAILS at FIRST ATTEMPT is 0. However, the minimum number of times an exit-controlled loop will run if the condition fails at first attempt is 1. Here the difference is that in an entry-controlled loop, the condition is checked before entry into the loop structure, while in an exit-controlled loop, the condition is checked after the completion of the loop structure.

52.

What is the name of the | operator?(a) Logical OR(b) Bitwise OR(c) Logical AND(d) Bitwise ANDI have been asked this question in my homework.The query is from Operators in portion Arduino Programming of Arduino

Answer»

Correct ANSWER is (b) Bitwise OR

The explanation: The ‘|’ operator is used to perform a bitwise OR OPERATION on any two numbers which SERVE as the operands. It performs an OR operation on each bit starting from the most significant bit to the least significant bit.

53.

What is the use of the SD.h Library in Arduino?(a) To communicate with the SD Card Module(b) To communicate with another microcontroller(c) To communicate with the computer(d) To communicate with the internetI had been asked this question in an interview for internship.This intriguing question originated from Standard Libraries topic in chapter Arduino Programming of Arduino

Answer»

Correct option is (a) To communicate with the SD CARD Module

To elaborate: The SD.h Library in ARDUINO allows for communications between the Arduino Board and an SD Card Module for STORAGE and RETRIEVAL of data. It is dependent on the sdfatlib library which works on FAT16 and FAT32 filesystems.

54.

What is the use of the interrupt mode?(a) Decides which type of transition to trigger on(b) Decides when to turn off interrupts(c) Decides which pin to turn off(d) Decides when to turn off the Arduino BoardThe question was asked in class test.My question comes from Interrupt Service Routine in portion Arduino Programming of Arduino

Answer»

Correct ANSWER is (a) Decides which type of transition to trigger on

Best explanation: There are different types of transition, RISING, FALLING, and CHANGE.

RISING – Triggers interrupt when PIN transitions from LOW to HIGH.

FALLING – Triggers interrupt when pin transitions from HIGH to LOW.

CHANGE – Triggers interrupt when pin transitions from LOW to HIGH or HIGH to LOW.

55.

What is the use of pin change interrupts?(a) To change pins during interrupts(b) To use more pins for interrupts(c) To disable pin usage during interrupts(d) To enable pin usage during interruptsThe question was posed to me during a job interview.The origin of the question is Interrupt Service Routine in portion Arduino Programming of Arduino

Answer»

Correct answer is (b) To use more pins for interrupts

For explanation: Pin change Interrupts can be used to enable the ARDUINO to use more than one pin during the interrupt service ROUTINE. In ATMega 168 or 328 based Arduino boards, upto 20 pins can be DEDICATED to interrupts.

56.

Which of these devices are supported by the Wire Library?(a) I2C Bus(b) Wi-Fi Devices(c) Bluetooth Devices(d) Cellular DevicesThe question was asked during an online exam.I would like to ask this question from Standard Libraries topic in chapter Arduino Programming of Arduino

Answer»

Correct option is (a) I2C Bus

Easy explanation: The Wire Library is used to COMMUNICATE data with the I2C (Inter IC) or TWI (Two Wire Interface) Bus which are almost IDENTICAL to each other and are used for COMMUNICATING data to different microcontrollers.

57.

What is the return type of the delayMicroseconds() function?(a) Unsigned Int(b) Signed Int(c) Unsigned Long(d) Signed LongThis question was addressed to me by my school principal while I was bunking the class.Asked question is from Time Functions in section Arduino Programming of Arduino

Answer»

Correct OPTION is (a) UNSIGNED Int

The best explanation: The delayMicroseconds() function delays or pauses program execution for a certain AMOUNT of time. The return TYPE here is unsigned int, which means basically a number of the int DATATYPE without any plus or minus signs. This number here is denoted by microseconds.

58.

How many RX-TX pairs of pins are present in the Arduino Mega?(a) 1(b) 2(c) 3(d) 4This question was addressed to me during an interview.This interesting question is from Serial and Stream Communications in division Arduino Programming of Arduino

Answer»

The correct option is (d) 4

The best explanation: The ARDUINO Mega has 3 RX-TX pairs; 0&1, 19&18, 17&16 and 15&14. The Serial pins are USED for establishing and maintaining communications between the computer and the Arduino. However, once any of these RX-TX pairs are setup for serial communications, during the COURSE of the program they cannot be used for GPIO.

59.

Which of the following statements is not true when dealing with the Firmata library?(a) The Firmata Library is used to establish communications between the Arduino and the Desktop(b) The Firmata Library uses the Firmata Protocol for communicating data(c) The Firmata Library uses the Midi Message Format(d) The Firmata Library can only be used on an Arduino UnoThis question was addressed to me in class test.My question is taken from Standard Libraries in chapter Arduino Programming of Arduino

Answer»

The correct ANSWER is (d) The Firmata Library can only be used on an ARDUINO Uno

To elaborate: The Firmata Library is used for communicating data to and from the computer. This is REQUIRED when the Arduino is required to store certain data on the computer which would be otherwise too large for the Arduino to store in its internal memory. Other uses of this library are in the field of IOT.

60.

What is the need for a quantizer in Digital Communications?(a) Break up a sampled signal to a finite dataset(b) Sample a pure analog signal(c) Sample a digital signal(d) Encode an analog signalI have been asked this question in an interview for job.Origin of the question is Digital Input Output topic in division Arduino Programming of Arduino

Answer»

Right option is (a) Break up a SAMPLED signal to a finite dataset

The explanation: The ADC (Analog to Digital Convertor) CIRCUIT converts the pure analog signal to a digitized signal with discrete VOLTAGE points. However, in order to be able to perform further complicated computations on the data, we need to convert the discrete signal into a set of finite data points. This is done by mapping the values to a set of POSITIVE real INTEGERS.

61.

Is the loop() function a replacement of the main() function in the Arduino Programming Environment?(a) No, it is a replacement for the constructor(b) Yes, it is a replacement(c) Yes, but only for certain Arduino Boards(d) No, it is not a replacementThe question was posed to me by my college director while I was bunking the class.I need to ask this question from The loop() Function in section Arduino Programming of Arduino

Answer»

Right answer is (d) No, it is not a replacement

Easiest explanation: The Arduino programming language is a subset of the C++ programming language, so the main function is also present here. However during the active development of any PROJECT using the Arduino Environment we do not encounter the main function()’s USE since it is prebuilt for that purpose to make the development simple, so that instead of worrying about LINKING the correct system functions to the main function during the development cycle of the project, the programmer only needs to worry about the ACTUAL working of his/her project.

62.

Can external generic C/C++ libraries be imported to the Arduino IDE and used in the code?(a) Yes, external C/C++ libraries can be used with the Arduino code(b) No, no external libraies can be imported to the Arduino code(c) Yes, but only libraries that are approved by the company can be used(d) Yes, but the libraries must be written in Arduino Code onlyI got this question in an online interview.This is a very interesting question from Programming topic in portion Arduino Programming of Arduino

Answer»

The correct choice is (a) YES, external C/C++ libraries can be used with the Arduino code

The EXPLANATION is: Since the Arduino Language is a subset of the C++ programming language, any existing C/C++ library can be used for IMPORTING into an Arduino code. There is no RESTRICTION on the USE of external libraries since most of the Arduino ecosystem is Open-Source.

63.

Which of the following file format is generated once the C code is compiled?(a) .c(b) .h(c) .ino(d) .oThis question was addressed to me during an interview for a job.I'd like to ask this question from Compilation in division Arduino Programming of Arduino

Answer» RIGHT choice is (d) .o

Explanation: All C code is compiled to a .o file. This file FORMAT is called the OBJECT File Format. The COMPILER creates these object files during compilation, for each SOURCE code and then links each of these together for making the executable file for that language.
64.

What is the difference between the INPUT and INPUT_PULLUP arguments in the pinMode() function?(a) They are both the same(b) INPUT supports only analog voltages while INPUT_PULLUP supports only digital voltage readings(c) INPUT takes the default reading as 0 while INPUT_PULLUP takes default reading as 1023(d) INPUT takes the default reading as 1023 while INPUT_PULLUP takes the default reading as 0The question was asked during an internship interview.My query is from Setting Pin Mode topic in division Arduino Programming of Arduino

Answer» RIGHT option is (c) INPUT takes the default reading as 0 while INPUT_PULLUP takes default reading as 1023

To explain: The pinMode() function has 2 arguments; the pin number and the MODE. The pin number argument takes the number of the pin as input while the mode can be SET in 3 different ways, including INPUT, OUTPUT, and INPUT_PULLUP. Here the OUTPUT argument makes the pin ready for sending signals, the INPUT argument makes the pin take a voltage as input from an external SOURCE. The INPUT_PULLUP also does the same function as INPUT however only differing in the aspect of base voltage, where the INPUT argument pulls down the voltage of that port to 0V every time there is no voltage is detected across the port while the INPUT_PULLUP argument pulls up the voltage across the port to the maximum for that board whenever there is no input voltage across the port, and the reading at the port decreases with INCREASE in voltage applied across the port.
65.

What type of signal does the analogWrite() method generate when a pin is set to OUTPUT mode?(a) Digital Signal(b) Pulse Code Modulated Signal(c) Pulse amplitude Modulated Signal(d) Pulse Width Modulated SignalI have been asked this question in examination.Enquiry is from Setting Pin Mode topic in chapter Arduino Programming of Arduino

Answer»

Correct answer is (d) PULSE Width Modulated Signal

The best I can EXPLAIN: The analogWrite() method in Arduino is used to generate a Pulse Width Modulated Signal since the digital circuitry in the Arduino does not allow for generation of true continuous analog WAVES. So THEREFORE, the PWM Signal is used.

66.

Select the correct name for the SPI master-slave configuration.(a) Dependent Slave Configuration(b) Independent Master Configuration(c) Independent Slave Configuration(d) Chained Master and Slave ConfigurationThis question was addressed to me at a job interview.Origin of the question is Uploading topic in portion Arduino Programming of Arduino

Answer»

Correct choice is (c) INDEPENDENT SLAVE Configuration

To EXPLAIN I would say: The Independent Slave Configuration is a type of SPI configuration where each slave is a separate chip and the master DEVICE talks to one chip at a time.

The setup is given below…

67.

Where does the Arduino IDE search if it needs to find out the Name of a type of Arduino Board?(a) build.txt(b) boards.txt(c) build.core(d) Arduino.hThe question was posed to me in an online quiz.The query is from Compilation in division Arduino Programming of Arduino

Answer» CORRECT choice is (b) BOARDS.txt

To elaborate: The different types of Arduino Boards which are also commonly REFERRED to as “VARIANTS” are present in the boards.txt file. This is a particularly important file because it contains the different configuration information for different Arduino Boards like which compiler toolchain to execute on a PARTICULAR variant.
68.

What functions are a static variable visible to?(a) Only Static Functions(b) All Types of Functions(c) Only Functions with a return type(d) Only Non Static FunctionsI have been asked this question during an interview for a job.My question comes from Variable Scope and Qualifiers topic in division Arduino Programming of Arduino

Answer»

Right ANSWER is (a) Only STATIC Functions

To explain: The static keyword makes the VARIABLE only visible to one function. The DATA HELD by static variables is not erased when the function call is over. This is what differentiates any static variable with a non-static variable.

69.

What is the function of the strcmp() function?(a) To compare two strings(b) To compile two strings(c) To concatenate two strings(d) To converge two stringsThis question was addressed to me in a job interview.I need to ask this question from String Manipulation topic in division Arduino Programming of Arduino

Answer»

Right ANSWER is (a) To compare TWO strings

For explanation I WOULD say: The strcmp() FUNCTION takes in two arguments to work and it’s JOB is to compare two strings. it returns 0 if the first and second strings are the same, returns a number greater than 0 if the first string is greater than the second one and vice versa.

70.

What is the return type for the shiftOut() function?(a) double(b) null(c) long(d) intI have been asked this question in final exam.I want to ask this question from Advanced Input Output in section Arduino Programming of Arduino

Answer»

Right option is (b) null

The BEST I can explain: The shiftOut() FUNCTION takes a byte of data as input and shifts the data bit by bit out to an output pin by either moving from left to right or vice VERSA. So, it does provide us an output, HOWEVER that output is directly UPDATED to the pin, and not sent back as a return value.

71.

What are the three components of a for-loop?(a) initialization, conditional, increment/decrement(b) conditional, memory allocation, memory deletion(c) reset, increment, conditional(d) reset, increment/decrement, memory allocationThis question was addressed to me in unit test.I'd like to ask this question from Looping topic in portion Arduino Programming of Arduino

Answer»

Correct ANSWER is (a) initialization, conditional, increment/decrement

For explanation I WOULD say: The for-loop structure is an entry controlled looping structure. It is GENERALLY used when there is a clear starting point and ENDING point to the loop. Unlike the while loop in which the ending point may or may not be INCLUDED in the loop structure.

72.

How many parameters does the flush() function accept?(a) 0(b) 1(c) 2(d) 4I got this question in quiz.I'm obligated to ask this question of Serial and Stream Communications topic in chapter Arduino Programming of Arduino

Answer»

Right ANSWER is (a) 0

Best explanation: The flush() function is a member of the stream CLASS. The function exists to clear every character that is stored in the buffer. It accepts no ARGUMENTS since it clears the entire buffer unconditionally on being INVOKED, so no parameters are required to carry out this operation.

73.

What is the numeric base of the math operations performed in binary?(a) 1(b) 2(c) 3(d) 4I got this question in exam.The query is from Digital Input Output in chapter Arduino Programming of Arduino

Answer»

Right choice is (B) 2

The explanation: All binary numbers have a base of 2. This means that this NUMBER SYSTEM has only 2 digits which are 0 and 1. The base of a number system is the number of unique characters or digits that are used for representing numbers.0

74.

What do we need to do if we want to run the setup() function in an infinite loop?(a) Call the setup() function from a custom named function(b) Call the setup() function from a constructor(c) Call the setup() function from the loop() function(d) Call the setup() function from the destructorI got this question in semester exam.I'm obligated to ask this question of The setup() Function topic in chapter Arduino Programming of Arduino

Answer»

The correct CHOICE is (c) Call the setup() function from the loop() function

For explanation: The setup() function is designed to RUN only at the startup of the Arduino code, in order to INITIALIZE and configure the setup before RUNNING the actual code. However it is theoretically possible to run the setup() function infinitely by calling it from the loop() function as illustrated below…

75.

How many types of macros are there?(a) 1(b) 2(c) 3(d) 4The question was posed to me in my homework.My query is from Preprocessing in portion Arduino Programming of Arduino

Answer»

Correct answer is (b) 2

To explain: A MACRO is a constant VARIABLE that gets initialized in a PROGRAM here with the help of a preprocessor. There are two types of macros, namely object type macros and function type macros. An object type macro is one which is simply a variable NAME with a VALUE attached to it while a function type macro is one which is of the form of expression.

76.

Is the Arduino code an Object-Oriented programming language or a Procedural programming language?(a) The Arduino Code follows the Object-Oriented ideology(b) The Arduino Code follows the Top-Down Procedural ideology(c) The Arduino Code follows the Bottom-Up Procedural ideology(d) The Arduino Code follows a custom Procedural IdeologyThe question was asked in a job interview.This intriguing question originated from Programming topic in section Arduino Programming of Arduino

Answer»

Correct answer is (a) The ARDUINO Code FOLLOWS the Object-Oriented ideology

The explanation is: SINCE the Arduino Programming Language is a SUBSET of the C++ Programming Language, it supports the Object-Oriented Programming approach much like C++.

77.

Is it possible to write code for the Arduino in any other programming language?(a) Yes, you can write(b) No, it only allows the use of Arduino Code(c) Yes, but you must write the code in C/C++ only(d) Yes, but you must write the code in Python OnlyThe question was posed to me during an online interview.Asked question is from Programming in division Arduino Programming of Arduino

Answer»

Right option is (a) Yes, you can write

The explanation: The Arduino compiler actually translates or in more technical terms ‘compiles’ the code into assembly language which uses the Arduino’s instruction SET. Thus, any other language which has a compiler capable of translating or COMPILING that code into the Arduino’s instruction set in assembly can ESSENTIALLY be used for writing Arduino code.

78.

How many pins are available for interrupt functions in the Arduino Uno?(a) No pins(b) All pins except pin 2 and 3(c) Only pin 2(d) Only pins 2 and 3I had been asked this question in an interview for internship.Question is taken from Interrupt Service Routine topic in section Arduino Programming of Arduino

Answer»

Correct OPTION is (b) All pins except pin 2 and 3

The explanation is: ISR allows to initiate an interrupt ROUTINE in any Arduino BOARD. The interrupt service routine can be used to automate a number of functions in an Arduino. Usually a number of pins are assigned for any Board. The Arduino Uno has ISR functionality ENABLED for only pins 2 and 3.

79.

What is the use of the Interrupt Service Routine in an Arduino?(a) To automate functions(b) To boot up the arduino(c) To make more memory(d) To exit any code that is runningThe question was asked during an interview.Asked question is from Interrupt Service Routine in division Arduino Programming of Arduino

Answer»

Correct answer is (a) To automate FUNCTIONS

To explain I would say: The interrupt service routine can be used to automate a number of functions in an arduino. In a SITUATION where the entire focus of the code is bound to one function, the ISR can act as a pause for the arduino to stop the CURRENT function temporarily and divert MEMORY to ANOTHER function. That way, the entire memory of the arduino is used up in one function.

80.

From which memory does the compiler revert to if a variable is declared volatile?(a) RAM(b) Storage Register(c) ROM(d) EEPROMI had been asked this question by my school principal while I was bunking the class.The doubt is from Variable Scope and Qualifiers in division Arduino Programming of Arduino

Answer»

Right choice is (a) RAM

The best EXPLANATION: ‘volatile’ is a DIRECTIVE to the compiler. It makes the compiler load the variable from the Random-Access Memory instead of the STORAGE register. It is also called a variable qualifier. It can be USED if exactly precise values are to be stored.

81.

What is the purpose of the pow(x,y) function?(a) To find x^y(b) To find y^x(c) To find e^x(d) To find 10^yI have been asked this question in my homework.This interesting question is from Mathematical Functions in section Arduino Programming of Arduino

Answer»

Right choice is (a) To find x^y

To explain: The pow() function is used to find the value of a number RAISED to another number. It takes two arguments; the BASE, and the EXPONENT. The input datatypes are of the FLOAT datatype and the output is of the double datatype.

82.

How to make the loop function run only once but the code inside run infinitely?(a) Create a recursive function call statement(b) Create a nested infinite loop within the loop() function(c) Call the setup() function from the loop() function(d) Call the loop() function from the setup() functionI had been asked this question in unit test.I need to ask this question from The loop() Function topic in section Arduino Programming of Arduino

Answer»

Correct choice is (b) Create a nested infinite loop within the loop() function

To explain I WOULD say: Yes, it is POSSIBLE to make the loop() function EXECUTE only once while running the code infinitely. This can be done by using an infinite loop within the loop() function so that the code never goes out of the loop and THUS never allowing the loop() function to iterate.

83.

#warning and #error are two preprocessor directives and the job of #warning is to throw a message to the Arduino IDE. However, which of these preprocessor directives stops the compilation process?(a) #error(b) #warning(c) #include(d) #defineThe question was posed to me in an international level competition.My query is from Preprocessing in chapter Arduino Programming of Arduino

Answer»

The correct OPTION is (a) #error

Explanation: As explained in the question, the job of the #WARNING preprocessor directive is to throw a MESSAGE to the Arduino IDE as a warning to notify the user or the programmer of something. However, it does not hinder in the COMPILATION PROCESS.

84.

How many configuration files are there which allows us to customize the architecture in an Arduino in order to add support for custom boards?(a) 1(b) 2(c) 3(d) 4This question was addressed to me in class test.My enquiry is from Compilation topic in portion Arduino Programming of Arduino

Answer»

The correct option is (c) 3

The EXPLANATION: There are 3 configuration files which allow a person to tweak the CONFIGURATIONS. These include the following files; platform.txt, boards.txt, and programmers.txt. These files are all really IMPORTANT in defining the architecture for DIFFERENT processors.

85.

How can you assign the binary number 101 to an integer variable?(a) Var = B101(b) Var = 101(c) Var = bin(101)(d) Var = Bin(101)I had been asked this question in examination.This question is from Datatypes topic in section Arduino Programming of Arduino

Answer»

Right answer is (a) Var = B101

Explanation: The concept used above is a binary formatter. If this letter is associated with the number during INITIALIZATION of the variable, the number is converted from that base to the base 10 which is the DECIMAL base. This binary formatter only works for NUMBERS which have a LENGTH of 8 bits.

86.

What language is a typical Arduino code based on?(a) C/C++(b) Java(c) Python(d) Assembly CodeThis question was posed to me during an interview.I need to ask this question from Programming in division Arduino Programming of Arduino

Answer»

The correct option is (a) C/C++

To elaborate: The Arduino CODE is basically a LIGHTLY modified version of the C++ programming language. It includes certain functions or MODULES that are SPECIFIC to the development of the Arduino platform and was preinstalled in the language by the developers.

87.

What is the meaning of the data returned by the sizeof() function?(a) Length(b) Location(c) Pointer(d) MemoryI had been asked this question by my school principal while I was bunking the class.The above asked question is from The sizeof() Function topic in section Arduino Programming of Arduino

Answer»

Correct choice is (a) Length

The BEST explanation: When the SIZEOF() FUNCTION is used, it returns a number which corresponds to the length of the structure in question. It’s used by programmers for finding the, say number of elements in an array, or the number of characters in a STRING, etc…

88.

What is the use of the detachInterrupt() function?(a) To turn off interrupt(b) To turn on interrupt(c) To disable interrupt functions for the remaining ON time.(d) To turn off the ArduinoI have been asked this question in an online quiz.My question is based upon Interrupt Service Routine in division Arduino Programming of Arduino

Answer» RIGHT option is (a) To turn off interrupt

Easy explanation: The interrupt SERVICE ROUTINE can be used to automate a NUMBER of functions in an arduino. In a situation where the entire focus of the code is bound to ONE function, the ISR can act as a pause for the arduino to stop the current function temporarily and divert memory to another function. The detachInterrupt() function turns off the ISR functionality temporarily.
89.

In C++ what type of operator is a cast operator?(a) Unary(b) Binary(c) Ternary(d) QuaternaryThis question was addressed to me in an interview.My question is from Type Conversions in chapter Arduino Programming of Arduino

Answer»

Correct answer is (a) Unary

Best explanation: The cast OPERATOR is a unary operator which is used to convert one data TYPE into ANOTHER FORCEFULLY. One example is:

90.

What is the special escape sequence for newline in C++?(a) ‘\b’(b) ‘\m’(c) ‘\n’(d) ‘\\’This question was posed to me in a job interview.Question is from String Manipulation in section Arduino Programming of Arduino

Answer»

Right choice is (C) ‘\N

To explain: The newline character is used for SHIFTING the CURSOR to the next line for any output to the MONITOR. It is mostly used for formatting output. During execution this escape sequence is converted to the OS Specific newline representation.

91.

What is the use of the sqrt() function?(a) To find the square of a number(b) To find the square root of a number(c) To find the cube root of a number(d) To find the cube of a numberThe question was posed to me in an interview.Question is taken from Mathematical Functions in section Arduino Programming of Arduino

Answer»

Right answer is (b) To find the SQUARE root of a number

The best explanation: The sqrt() function is used to find the square root of a number. It takes ONE argument; the number whose square root is to be FOUND out. This function can accept any number-based datatypes and GIVES the output in the double datatype.

92.

What is the resolution of the micros() function on the Arduino LilyPad?(a) 2 Microseconds(b) 4 Microseconds(c) 6 Microseconds(d) 8 MicrosecondsThis question was addressed to me during an interview.I want to ask this question from Time Functions in division Arduino Programming of Arduino

Answer»

Correct option is (d) 8 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 LILYPAD it’s resolution is 8 Microseconds.

93.

How many bits of memory does the bool datatype occupy?(a) 2(b) 4(c) 6(d) 8This question was posed to me by my college professor while I was bunking the class.I'd like to ask this question from Datatypes topic in portion Arduino Programming of Arduino

Answer»

Correct OPTION is (d) 8

To explain: The bool datatype can only take 2 values; TRUE or FALSE. This takes a space of 8 bits or 1 BYTE. It’s mostly used in digital read or write operations to denote a 0V or 5V signal output or input. It can also be used for DECISION making.

94.

What is the return type of the micros() function?(a) Signed Long(b) Signed Int(c) Unsigned Long(d) Unsigned IntThis question was posed to me in an interview for internship.Question is from Time Functions in chapter Arduino Programming of Arduino

Answer»

Right choice is (c) UNSIGNED Long

Explanation: The micros() 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 microseconds.

95.

Can the tone() and noTone() functions be used for digital communications?(a) No, they cannot be used(b) Yes, they can be used but only on certain Arduino Boards(c) Yes, they can be used for all digital pins and Arduino Boards(d) Yes, they can be used but only for certain pinsThis question was addressed to me in class test.This is a very interesting question from Advanced Input Output in portion Arduino Programming of Arduino

Answer»

Right option is (c) Yes, they can be used for all digital pins and ARDUINO Boards

Easy explanation: The tone() function generates a square wave at a constant 50% duty cycle and a specified FREQUENCY. So, if a COMMUNICATION is to be established between two devices on this basis, the receiver only has to record the different frequencies of the square WAVES and map them to a certain set of finite predefined integers in order to obtain some meaningful data from the TRANSMISSION.

96.

Which of the following is not a method to convert analog signals to digital signals?(a) Pulse Code Modulation(b) Pulse Amplitude Modulation(c) Pulse Width Modulation(d) Frequency ModulationI have been asked this question in semester exam.This intriguing question originated from Digital Input Output topic in division Arduino Programming of Arduino

Answer»

Correct answer is (d) Frequency Modulation

Explanation: Any Modulation TECHNIQUE that converts an analog signal to a digital signal is of immense importance in pure digital circuits like the Arduino. These help the Arduino’s circuit to RECEIVE raw unmodulated signals from the outside and process them in a digital environment. Here frequency modulation is the only modulation technique that only WORKS with analog-to-analog signal modulation.

97.

Can the loop() function be used to call another function that is custom defined by the programmer?(a) Yes, it can call(b) No, it cannot call(c) Yes, it can call but only functions with no return values(d) Yes, it can call but only functions with return valuesThis question was addressed to me during an internship interview.My question is taken from The loop() Function topic in division Arduino Programming of Arduino

Answer»

Correct option is (a) YES, it can call

The explanation is: In C/C++ Programming, a FUNCTION can call any other function WHETHER it be the MAIN function or any other custom defined function. In the case of the Arduino, the setup() and the loop() functions are custom predefined functions that are a part of the Arduino programming language subsystem.

98.

How many arguments does the digitalRead() function have?(a) 1(b) 2(c) 3(d) 4This question was posed to me during an interview.This interesting question is from Digital Input Output in section Arduino Programming of Arduino

Answer»

Correct CHOICE is (a) 1

Easy explanation: The digitalRead() function is used to take digital 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 and 5V.

99.

How many times does the setup() function run on every startup of the Arduino System?(a) 1(b) 2(c) 3(d) 4I have been asked this question during an online interview.My question comes from The setup() Function in chapter Arduino Programming of Arduino

Answer»

The correct answer is (a) 1

For explanation I would say: The setup() function is used predominantly to configure the pins, variables, SERIAL DATA, etc. and is executed only once THROUGHOUT the entire cycle of the program. However other than the above-mentioned uses, it can also be used to EXECUTE technically all aspects of an Arduino program, but since it only RUNS one time, it’s not very useful for anything other than configuring.

100.

In which memory does the Arduino save data in when the PROGMEM Utility is invoked?(a) EEPROM(b) SRAM(c) Flash(d) DRAMI had been asked this question in an interview for job.This interesting question is from PROGMEM Utility topic in chapter Arduino Programming of Arduino

Answer»

The correct choice is (c) Flash

The explanation is: When the PROGMEM Utility is invoked, data being saved is diverted to the flash memory INSTEAD of the SRAM. This utility is a VARIABLE MODIFIER, which means it can change the variable policy whenever invoked.