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.

1.

When the sizeof() function is invoked on an array. What information does it return?(a) Number of elements in the array(b) The largest element in the array(c) The total sum of the ASCII values of the elements in the array(d) The largest ASCII value of any element in the arrayThis question was posed to me during a job interview.My enquiry is from The sizeof() Function topic in portion Arduino Programming of Arduino

Answer»

The correct OPTION is (a) Number of ELEMENTS in the array

To elaborate: 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.

2.

What is the conversion type for reinterpret casting?(a) Pointer to Variable(b) Variable to Variable(c) Pointer to Pointer(d) Variable to PointerThe question was asked in an interview.My doubt is from Type Conversions in division Arduino Programming of Arduino

Answer» CORRECT choice is (c) POINTER to Pointer

For explanation: REINTERPRET CASTING is used to convert a pointer of any data type to another pointer of any other data type. Additionally, this does not MATCH the datatype of the value and the pointer.
3.

Which header file contains the PROGMEM Utility?(a) The avr/pgmspace.h header file(b) The pmspace.h header file(c) The avr/pspace.h header file(d) The avr/progmem.h header fileI got this question in quiz.My question is taken from PROGMEM Utility topic in section Arduino Programming of Arduino

Answer»

Right option is (a) The avr/pgmspace.h header FILE

The explanation: The PROGMEM Utility is contained WITHIN the avr/pgmspace.h header file and this file is to be INVOKED WHENEVER a programmer needs to use the PROGMEM Utility for his or her program. However, while using the data stored in the FLASH memory one also needs to use certain functions defined within the header file to retrieve the data.

4.

What is the use of the tan() 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 online exam.I want to ask this question from Mathematical Functions in portion Arduino Programming of Arduino

Answer»

Right option is (c) To find the tan of a NUMBER

Best explanation: The tan() function is used to find the tangent of an ANGLE. It takes one argument; the angle whose tangent 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.

5.

What is the return type of the substr() function?(a) int(b) long(c) byte(d) stringI got this question during an online interview.This is a very interesting question from String Manipulation in portion Arduino Programming of Arduino

Answer»

Right answer is (d) string

Easy explanation: The substr() FUNCTION is USED to return a PORTION of a given string. It accepts 2 inputs as arguments; the lower and UPPER INDEXES. It can be used as “str.substr(a,b);” where a is the lower index and b is the upper index.

6.

Is there a difference between the = and the == operators?(a) Yes(b) NoThis question was posed to me during an interview for a job.The query is from Operators in chapter Arduino Programming of Arduino

Answer» CORRECT option is (a) YES

Explanation: Yes, there is a difference between those two operators. The = operator SIGNIFIES any assignment of values to some variable or data storage, while the == operator is a comparison operator which checks the equality of the operands it WORKS with.
7.

What is the function in Arduino that is capable of reading Strings from a stream and store the acquired value into a String?(a) Stream.readstring()(b) Stream.stringread()(c) Stream.readString()(d) Stream.readfromstring()I got this question in an interview.My enquiry is from Serial and Stream Communications topic in division Arduino Programming of Arduino

Answer»

Right choice is (C) Stream.readString()

The explanation is: The Stream.readString() is a FUNCTION that belongs to the Stream CLASS. It’s capable of reading any String from a stream and then store the output into a String. This function can also be called from the Wire class. There is a TIMEOUT for this reading which is defined by the setTimeout() function.

8.

Which library allows for manipulating the real time clock of an Arduino?(a) RTC Library(b) RT Library(c) Clock Library(d) Time LibraryThis question was addressed to me during an online exam.Origin of the question is Other Libraries in division Arduino Programming of Arduino

Answer»

Right answer is (a) RTC LIBRARY

For explanation: This library WORKS on Arduino Boards that have the SAMD Architecture, including the Arduino Zero, MKRZero, etc. It allows for manipulating the Internal Real Time Clock of the Arduino. The Real Time Clock MAINTAINS the current time related information and can also be used for scheduling programs.

9.

How many tone() functions can be invoked to run simultaneously on an Arduino Board?(a) As many pins are present(b) Infinite number(c) Only one(d) Depending on the number of timers presentThe question was asked in exam.Enquiry is from Advanced Input Output in portion Arduino Programming of Arduino

Answer»

Correct option is (c) Only one

For explanation I WOULD say: The tone() function uses the Arduino’s built in timer to generate the square wave of the necessary FREQUENCY. So the number of tone() INVOKES a board can handle depends UPON the number of timers present on that board.

10.

What is the difference between an IDE and a compiler?(a) The IDE executes the code while the compiler gives a graphical environment for writing the code(b) The compiler executes the code while the IDE gives a graphical environment for writing the code(c) The compiler links the code to the respective files and the IDE takes it from there(d) The compiler and the IDE are the same thingThe question was posed to me during an online exam.This interesting question is from Programming topic in section Arduino Programming of Arduino

Answer»

Right CHOICE is (B) The compiler executes the code while the IDE gives a graphical environment for writing the code

To explain: According to the primary definitions of a compiler and an IDE, the job of DEBUGGING and EXECUTING a piece of code falls on the compiler, while the job of the IDE is to provide an easy to USE environment for writing the code in the first place.

11.

Can PROGMEM be used on arrays?(a) Yes(b) NoThis question was addressed to me during an interview.My enquiry is from PROGMEM Utility topic in division Arduino Programming of Arduino

Answer»

Right choice is (a) Yes

Explanation: 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 so it can be used on any kind of data STRUCTURES allowed by the language.

12.

Will the delay() function work inside an interrupt routine?(a) Yes(b) NoI got this question in an internship interview.My doubt is from Interrupt Service Routine in chapter Arduino Programming of Arduino

Answer»

Correct choice is (b) No

For EXPLANATION: The delay function will not work inside any Interrupt and it will not be ABLE to function properly in any way. So, no programmer should use it inside the code DEDICATED for running as INTERRUPTS. However delayMicroseconds() will work as it normally would.

13.

Which one of the control structures is similar to the if-else statement?(a) Switch-case(b) For loop(c) While loop(d) ContinueThe question was posed to me in an interview.My doubt is from Control Structures topic in chapter Arduino Programming of Arduino

Answer»

Right answer is (a) Switch-case

For explanation: The switch case is ANOTHER TYPE of decision-making control structure which can be used as a total REPLACEMENT for the if-else structure. However, since it’s a more RIGID structure, it’s mostly used for menu driven programs.

14.

Who initiates explicit type casting?(a) The programmer(b) The compiler(c) The microcontroller(d) The assemblerI had been asked this question in final exam.This intriguing question comes from Type Conversions in section Arduino Programming of Arduino

Answer»

Correct answer is (a) The programmer

The best explanation: Explicit type casting is the process wherein the programmer specifies in the code the SOURCE and destination data type of any variable WHOSE type needs to be CONVERTED. Unlike IMPLICIT type casting, here the compiler doesn’t initiate the CONVERSION until the programmer says so.

15.

Which of the following control structures is an exit-controlled loop?(a) For loop(b) While loop(c) Const and Goto(d) Do-While loopI have been asked this question in an interview.This is a very interesting question from Control Structures in portion Arduino Programming of Arduino

Answer»

The CORRECT choice is (d) Do-While loop

To explain: An entry-controlled loop is a looping structure that performs the INITIALIZATION, condition-checking, and increment/decrement operation at the beginning of the loop. So THEREFORE, before a loop even starts to execute, a CHECK is made if the condition is satisfied or not. In an exit controlled only the condition checking is DONE after the execution.

16.

What is the return type of the front() function?(a) char(b) int(c) long(d) shortThis question was posed to me during an interview for a job.This is a very interesting question from String Manipulation in section Arduino Programming of Arduino

Answer»

Correct ANSWER is (a) char

Explanation: The front() function RETURNS a character from the string GIVEN as input. It takes in no arguments. It returns the first character that is present in the string. It can be used as “cout<

17.

In Serial Communications, how many sections is a data packet divided into?(a) 1(b) 2(c) 3(d) 4This question was addressed to me by my school principal while I was bunking the class.My question is from Serial and Stream Communications topic in division Arduino Programming of Arduino

Answer»

Correct choice is (d) 4

For explanation I would say: The data PACKET is divided into 4 sections. The FIRST section being the start bit which is usually 1. After that COMES the data frame which holds the data which can range from being 5-BITS to 9-bits. The section after the data section comes the parity section which denotes whether the number of bits in the data packet is odd or even. The final section is the stop-bit. This section can hold upto 2 bits and is used to indicate the end of the data packet.

18.

What purpose does the Bridge Library serve on the Arduino Yun?(a) Connecting the Linux processor and the microcontroller onboard the Yun(b) Disconnecting the Linux processor and the microcontroller onboard the Yun(c) Making the Linux Processor the master device and the microcontroller, the slave device(d) Making the Linux Processor the slave device and the microcontroller, the master deviceThis question was posed to me in a job interview.This is a very interesting question from Other Libraries topic in division Arduino Programming of Arduino

Answer»

Right OPTION is (a) Connecting the Linux processor and the MICROCONTROLLER onboard the Yun

Easiest explanation: The Arduino Yun has two processors onboard; the Atheros 9331 which is a processor that runs Linux and the Atmega32U4 which is a microcontroller. The JOB of the Bridge LIBRARY’s job is to connect these two devices and enable communication between them.

19.

What is the library to be used if one wants to use UART communications on an Arduino?(a) TFT Library(b) SoftwareSerial Library(c) Ethernet Library(d) I2C LibraryThe question was posed to me in a national level competition.I need to ask this question from Standard Libraries topic in chapter Arduino Programming of Arduino

Answer»

The correct CHOICE is (B) SoftwareSerial Library

Easiest explanation: The UART (Universal Asynchronous Receiver Transmitter) is a piece of hardware that allows digital communications between 2 IC’s. The pins on the ARDUINO that support this are 0 and 1. This functionality is parallel in nature, i.e. the Atmega chip on the Arduino can receive UART data and continue to work on whatever it was working on, at the same time.

20.

Which chipset is the LCD library for Arduino based on?(a) Hitachi HD44780(b) Hitachi HD45780(c) Hitachi HDD4780(d) Hitachi HD46780I got this question in homework.Asked question is from Standard Libraries topic in division Arduino Programming of Arduino

Answer»

The correct option is (a) Hitachi HD44780

The BEST explanation: The LCD Library in Arduino allows for controlling LCD DISPLAYS with the Arduino. This is based on the Hitachi HD44780 Chipset which is a dot MATRIX LCD (Liquid Crystal DISPLAY) Driver. It can be configured and used with 4-bit and 8-bit microcontrollers.

21.

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.

22.

Can the digitalRead() function identify analog voltages?(a) Yes, it can(b) No, it cannot(c) Yes, it can but only 2(d) Yes, it can but only 4I have been asked this question during a job interview.This key question is from Digital Input Output in chapter Arduino Programming of Arduino

Answer»

Correct answer is (c) YES, it can but only 2

To EXPLAIN: The digitalRead() FUNCTION is used to receive digital signals as input through the port and then process the DATA further. However, it can only distinguish between 5V (3.3V for some Arduino Boards) and 0V which correspond to the digital HIGH and the digital LOW signals RESPECTIVELY.

23.

What is the recipe for compiling Assembly Source Code in the Arduino IDE?(a) recipe.S.o.pattern(b) recipe.A.n.pattern(c) recipe.S.b.pattern(d) recipe.S.i.patternI have been asked this question at a job interview.I would like to ask this question from Uploading topic in section Arduino Programming of Arduino

Answer» CORRECT option is (a) recipe.S.o.pattern

For explanation I would say: A recipe in Computer Science is the steps involved in creating something. Here the compiler has a predetermined “Recipe” or way to deal with Assembly Source Codes when the need ARISES. Now since the Arduino IDE can also COMPILE C and C++ source files, it also has a predetermined way to deal with those file types as WELL.
24.

What is the use of the MOSI and MISO pins?(a) To download code from the microcontroller to the computer(b) To verify the program that the computer uploads to the microcontroller(c) To erase the SRAM of the microcontroller(d) To dump or transfer programs from the computer to the microcontrollerThe question was asked in my homework.This interesting question is from Uploading in section Arduino Programming of Arduino

Answer»

The correct option is (d) To dump or TRANSFER programs from the computer to the microcontroller

The explanation: The MOSI and MISO pins are a PART of the SPI (Serial Peripheral Interface) for transferring data over short distances. It is a FORM of Synchronous Serial Communication. These pins COMMIT hex data from the computer to the EEPROM and flash memory of the microcontroller.

25.

What notation should we use for denoting the breadth of an array?(a) sizeof(a[0])(b) sizeof(a)(c) sizeof(a[])(d) sizeof(a.0)The question was posed to me in an online interview.My doubt stems from The sizeof() Function in chapter Arduino Programming of Arduino

Answer»

Correct choice is (a) SIZEOF(a[0])

BEST explanation: When the first element of an array is invoked in the sizeof() function, if the array is a 2D array then it will give the number of elements PRESENT in the BREADTH of the matrix.

26.

What is the use of the attachInterrupt() function?(a) To enable ISR usage(b) To enable ISR usage, but only on certain Arduino Boards(c) To decommission ISR usage for a particular Arduino Board(d) To translate pin numbersI have been asked this question in quiz.My question is from Interrupt Service Routine in division Arduino Programming of Arduino

Answer»

The CORRECT OPTION is (a) To enable ISR usage

To elaborate: The attachInterrupt() function ALLOWS us 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.

27.

What is the return type of the millis() function?(a) Signed Long(b) Unsigned Long(c) Signed Float(d) Unsigned IntI got this question during an online interview.My question is based upon Time Functions in section Arduino Programming of Arduino

Answer»

Correct answer is (b) Unsigned LONG

To explain: The millis() 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 milliseconds.

28.

Does the UART Architecture require an external clock?(a) Yes(b) NoThis question was posed to me in examination.Origin of the question is Serial and Stream Communications in section Arduino Programming of Arduino

Answer»

Correct ANSWER is (b) No

To elaborate: UART stands for Universal Asynchronous Receiver/Transmitter. This means all communication here is not governed by the presence of a clock UNLIKE the I2C and the SPI protocol which REQUIRE an EXTRA pin for performing serial communications.

29.

What is the full form of UART?(a) Universal Asynchronous Receiver/Transmitter(b) Universal Anti-Rectifying Transmitter(c) Universal Asynchronous Radio Transmitter(d) Universal Asynchronous Rectifier TransistorI have been asked this question in examination.My query is from Serial and Stream Communications in portion Arduino Programming of Arduino

Answer»

Correct option is (a) Universal Asynchronous Receiver/Transmitter

To EXPLAIN I would say: The UART architecture is a very important part of SERIAL Communications. It is not a protocol like the I2C or SPI, but a physical circuit CONFIGURATION. Serial communication uses the UART architecture to send and receive the data serially from the COMPUTER.

30.

Which Arduino Board does the SigFox Library work with?(a) Arduino MKR1000(b) Arduino MKRFOX1200(c) Arduino MKRZero(d) Arduino MKRFOX1230The question was posed to me during an online exam.Query is from Other Libraries in section Arduino Programming of Arduino

Answer»

Correct option is (b) Arduino MKRFOX1200

To explain I WOULD say: The SigFox Library ALLOWS the use of the SigFox transreceiver with the Arduino MKRFOX1200 BOARD. It uses UNB (Ultra Narrow Band) to interconnect remote devices. It’s a low energy device which falls in the category of LPWAN (Low Powered Wide Area Network).

31.

If one would want to place a call using an Arduino which library would one use which was specifically designed for that purpose?(a) The Firmata Library(b) The TFT Library(c) The GSM Library(d) The Ethernet LibraryI got this question in a job interview.This key question is from Standard Libraries in section Arduino Programming of Arduino

Answer»

The correct option is (c) The GSM Library

The BEST I can EXPLAIN: The GSM library on the Arduino helps the user to perform call, SMS, or even Internet Communications via the GSM Module. This library works in CONJUNCTION with the GSM Shield which USES a modem and AT commands to connect the Arduino to the GSM NETWORK.

32.

What is the use of the Ethernet library?(a) To connect the Arduino to Bluetooth(b) To connect the Arduino to Wi-Fi(c) To connect the Arduino to Li-Fi(d) To connect the Arduino to EthernetI have been asked this question at a job interview.My question is from Standard Libraries in division Arduino Programming of Arduino

Answer»

Right choice is (d) To connect the ARDUINO to Ethernet

To explain: The Ethernet Library is USED to connect the Arduino to the internet via an Ethernet CONNECTION. This library is designed to be used with any Arduino Ethernet Shields or any other W5100, W5200, etc. based DEVICES.

33.

Why does every compilation of a source code in Arduino check for previous compilations?(a) To delete the previously generated “.o” files(b) To use the previously generated “.o” files(c) To relocate the previously generated “.o” files(d) To copy the previously generated “.o” filesI had been asked this question in exam.This question is from Compilation topic in section Arduino Programming of Arduino

Answer»

The correct answer is (b) To use the previously generated “.o” files

The explanation is: During the compilation PROCESS, the Arduino compiler before compilation SEARCHES for previously generated “.o” files in the DIRECTORY, to make the compilation process faster in some cases. This reduces the redundancy of compiling the same PARTS of the code REPEATEDLY.

34.

How many arguments does the shiftOut() function require?(a) 1(b) 2(c) 3(d) 4I had been asked this question in an interview for internship.Question is taken from Advanced Input Output in section Arduino Programming of Arduino

Answer»

Right option is (d) 4

The best explanation: The shiftOut() FUNCTION requires 4 arguments; the PIN number to which the bit of DATA is to be sent, the toggle-pin which is to be turned HIGH or LOW once the data is done transferring, the order in which the bits are to be read (MSBFIRST or LSBFIRST), and the actual data who’s bits are to be shifted out.

35.

What is the purpose of the tone() function?(a) To generate a sine wave(b) To generate a cosine wave(c) To generate a stable voltage level(d) To generate a square waveI had been asked this question during an online exam.My doubt is from Advanced Input Output in section Arduino Programming of Arduino

Answer»

Correct option is (d) To generate a square wave

Explanation: The tone() FUNCTION is used to generate a square wave of 50% duty cycle. It accepts a maximum of 3 arguments; the pin number, the frequency, and the duration of the wave. If no duration is specified then the wave is CONTINUED to be generated until the noTone() function is invoked WITHIN the code.

36.

Can the loop() function be used to replace the functionality of the setup() function?(a) Yes, it can(b) No, it cannot(c) Yes, it can, but only for certain Arduino Boards(d) Yes, it can, but only for a limited time frameThe question was asked in a job interview.Query is from The loop() Function in division Arduino Programming of Arduino

Answer»

Right ANSWER is (a) Yes, it can

Easy explanation: Yes, the loop() function can replace the setup() function completely, theoretically, since both the loop() function and the setup() functions are custom predefined functions in the Arduino Environment. However, this would RESULT in more WORK from the developer’s END since he/she would have to find a way to make configuration code run only once.

37.

What is the use of the digitalPinToInterrupt() function?(a) To create an Interrupt Object(b) To delete an Interrupt Object(c) To map the Arduino Pin to the Interrupt pin(d) To invoke the Interrupt Service RoutineI had been asked this question in unit test.I need to ask this question from Interrupt Service Routine in portion Arduino Programming of Arduino

Answer»

Correct choice is (C) To map the Arduino Pin to the Interrupt pin

To explain I would SAY: The digitalPinToInterrupt() function translates the physical pin number on the arduino into the interrupt index. This works in almost all Arduino Boards and is usually used in conjunction with the attachInterrupt() function.

38.

How many bits of memory does the Short datatype take up?(a) 17(b) 15(c) 16(d) 14I had been asked this question by my school principal while I was bunking the class.This key question is from Datatypes in portion Arduino Programming of Arduino

Answer»

Right choice is (c) 16

To 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 short datatype takes up 16 bits of MEMORY. In other words, it can store NUMBERS between -32768 to 32767.

39.

How many arguments does the at() function take?(a) 0(b) 1(c) 2(d) 3The question was asked in final exam.I would like to ask this question from String Manipulation in division Arduino Programming of Arduino

Answer»

The correct answer is (b) 1

The best I can explain: The at() function returns a CHARACTER from the string given as input. It takes 1 ARGUMENT. It returns the character that is PRESENT in the string as specified by the argument. It can be used as “cout<

40.

What is the use of the sq() function?(a) To find the square root of a number(b) To find the square of a number(c) To find the cube of a number(d) To find the cube root of a numberThe question was posed to me in unit test.This interesting question is from Mathematical Functions topic in portion Arduino Programming of Arduino

Answer» CORRECT answer is (b) To find the square of a number

For EXPLANATION I WOULD SAY: The sq() function is used to find the square of a number. It takes ONE argument; the number whose square is to be found out. This function can accept any number-based datatypes and gives the output in the double datatype.
41.

What is the name of the ~ operator?(a) Bitwise NOT(b) Logical NOT(c) Bitwise SHIFT(d) Pointer AddressI have been asked this question in my homework.This interesting question is from Operators in chapter Arduino Programming of Arduino

Answer»

Correct choice is (a) Bitwise NOT

To explain I would say: The ~ operator is used to PERFORM a bitwise NOT operation on any TWO numbers which serve as the OPERANDS. It performs a NOT operation on each bit starting from the most SIGNIFICANT bit to the least significant bit.

42.

What is the difference between ternary operators and unary operators?(a) Ternary Operators work with 1 operand while unary operators work with 3 operands(b) Ternary Operators work with 3 operands while unary operators work with 1 operand(c) Ternary Operators work with 2 operands while unary operators work with 3 operands(d) Ternary Operators work with 4 operands while unary operators work with 1 operandThis question was addressed to me in examination.This intriguing question comes from Operators topic in portion Arduino Programming of Arduino

Answer»

Right CHOICE is (B) Ternary Operators WORK with 3 operands while unary operators work with 1 operand

The explanation is: The term “ternary” depicts three and the term “unary” depicts the term one. So therefore, ternary operators need 3 operands and unary operators use 1 operand.

Eg:-

43.

What is the maximum number of arguments does the find() function accept?(a) 1(b) 2(c) 3(d) 4The question was posed to me at a job interview.My doubt is from Serial and Stream Communications topic in division Arduino Programming of Arduino

Answer» CORRECT answer is (b) 2

For explanation I WOULD say: The find() function accepts a maximum of 2 PARAMETERS; the target which can be a set of CHARACTERS, and the length of the target which denotes the lexical length of the target. This function then searches for the target throughout the stream and returns a Boolean True if a match is found, otherwise a Boolean False if the target is not found.
44.

Which of the following is not a Digital Encoding Technique?(a) NRZ (Non-Return to Zero)(b) Amplitude Modulation(c) Manchester(d) RZ (Return to Zero)This question was addressed to me in quiz.The doubt is from Digital Input Output topic in section Arduino Programming of Arduino

Answer»

The correct option is (b) Amplitude Modulation

Easy explanation: Any digital signal can be defined as a SERIES of 1’s and 0’s. These series may or may not be in a predefined pattern. This can make it very difficult for the receiver to be ABLE to decipher the signal. THUS, the digital coding techniques INVOLVE mostly converting a random pattern of 1’s and 0’s into a predefined pattern of a signal which the receiver can decipher easily. Here Amplitude Modulation Technique is an analog modulation technique.

45.

Which Arduino Board Architectures can the Audio Frequency Meter Library work on?(a) SAM Architecture(b) Intel Architecture(c) SAMD Architecture(d) ARM ArchitectureThis question was posed to me during a job interview.I would like to ask this question from Other Libraries in chapter Arduino Programming of Arduino

Answer»

Right answer is (c) SAMD Architecture

To explain: The Audio Frequency Meter Library only works on Arduino Boards having the SAMD Architecture, INCLUDING the Arduino Zero, MKRZero, etc. It allows for the sampling of an analog signal and finding out it’s frequency. Any analog PIN is SUPPORTED for this operation.

46.

What is the .d file format’s use in C?(a) For managing dependencies(b) For the D programming language(c) For storing the variables and memory locations(d) For creating new errors in dependenciesI have been asked this question during an online exam.My question is taken from Compilation topic in portion Arduino Programming of Arduino

Answer»

The correct ANSWER is (a) For managing dependencies

The EXPLANATION: The “.d” file format is used for managing and generating the dependency list for a program. A dependency is a supporting program that has the FUNCTIONALITY that is REQUIRED for the smooth and in times, the very execution of another program.

47.

When does the Interrupt Handler execute it’s assigned code?(a) After all the codes executed in the program(b) Before any code is executed in the program(c) Blocks the code from getting executed at any time in the program(d) When the interrupt is in effectI have been asked this question in examination.My doubt is from Interrupt Service Routine in chapter Arduino Programming of Arduino

Answer»

The correct option is (d) When the INTERRUPT is in effect

Easy explanation: The Interrupt Handler is an event by NATURE which, when raised, stops any code that is executing and first executes the code that is assigned to it, then RETURNS the control BACK to the normal EXECUTION.

48.

Which of the following escape sequences placed at the end of a string makes the string a Null Terminated String?(a) ‘\p’(b) ‘\u’(c) ‘\0’(d) ‘\1’This question was posed to me during an interview.This intriguing question originated from String Manipulation topic in chapter Arduino Programming of Arduino

Answer»

Right answer is (c) ‘\0’

The explanation: The ‘\0’ when placed at the END of a string makes it a NULL terminated string which is simply a single DIMENSIONAL array of characters that are trailed by the ‘\0’ escape sequence. It is ALSO CALLED the ASCII NUL character.

49.

How many pins are available for interrupt functions in the Arduino Zero?(a) No pins(b) All pins except pin 4(c) Only pin 4(d) Only pin 3The question was asked in class test.I would like to ask this question from Interrupt Service Routine topic in section Arduino Programming of Arduino

Answer»

The correct OPTION is (b) All pins EXCEPT pin 4

To explain: 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 Zero has ISR functionality enabled for all it’s pins except pin 4.

50.

How many operands does the >= operator require?(a) 1(b) 2(c) 3(d) 4The question was asked in a job interview.Enquiry is from Operators in portion Arduino Programming of Arduino

Answer»

The correct choice is (b) 2

Explanation: The >= OPERATOR is a binary operator and it requires only 2 operands. The operator takes the two operands as INPUT which should be 2 numbers and then it outputs a Boolean True or a False DEPENDING UPON whether the operand 1 is GREATER than or equal to operand 2.