1.
Identify the Invalid ‘If conditional statement'.
Correct Answer
B. If (variable = 50)
Explanation
The given statement "If (variable = 50)" is an invalid 'If conditional statement' because the equality operator used is "=" instead of "==" or "===" which are the correct equality operators in most programming languages. The "=" operator is used for assignment, not for comparison, so it would not evaluate the condition correctly.
2.
Which 'If conditional statement' will not execute in any program?
Correct Answer
A. If (0)
Explanation
The conditional statement "If (0)" will not execute in any program because the condition inside the parentheses evaluates to false. In programming, a condition that evaluates to false means that the code block inside the if statement will not be executed. Since 0 is considered a false value in most programming languages, the code block inside "If (0)" will never be executed.
3.
Arduino (Atmega) Pins are in low impedance state when pins are configured as
Correct Answer
B. OUTPUT
Explanation
When Arduino pins are configured as OUTPUT, they are set to a low impedance state. This means that they can provide a strong and stable output signal without being affected by external factors. In this state, the pins can drive devices connected to them, such as LEDs or motors, with sufficient current to operate properly. Therefore, the correct answer is OUTPUT.
4.
Arduino (Atmega) pins are in high impedance state when pins are configured as
Correct Answer
A. INPUT
Explanation
When Arduino (Atmega) pins are configured as INPUT, OUTPUT, or INPUT_PULLUP, they are in a high impedance state. This means that the pins are not actively driving the signal and are instead allowing the signal to be controlled by external devices. In the INPUT mode, the pins are ready to receive input from external devices. In the OUTPUT mode, the pins can provide output to external devices. In the INPUT_PULLUP mode, the pins are internally pulled up to a high voltage level, allowing them to be used as inputs with a default high state. Therefore, all of these configurations result in the pins being in a high impedance state.
5.
Arduino (Atmega) pins can source / sink current up to
Correct Answer
C. 40mA
Explanation
Arduino (Atmega) pins can source/sink current up to 40mA. This means that the pins can provide or draw a maximum current of 40mA without getting damaged. It is important to stay within this limit to avoid damaging the Arduino board or the connected components.
6.
Arduino platform is based on which micro-controller's family?
Correct Answer
B. AVR microcontroller family
Explanation
The correct answer is AVR microcontroller family. The Arduino platform is based on the AVR microcontroller family. AVR microcontrollers are widely used in the Arduino boards due to their low power consumption, high performance, and ease of programming. These microcontrollers are manufactured by Atmel Corporation and are known for their simplicity and versatility, making them suitable for a wide range of applications in the Arduino platform.
7.
In which file extension Arduino sketches are saved?
Correct Answer
A. .ino
Explanation
Arduino sketches are saved with the file extension .ino. This file extension is specific to the Arduino IDE and is used to identify the source code files that contain the program logic for Arduino boards. The .ino extension helps the IDE recognize and organize these files, making it easier for users to work with and upload their sketches to Arduino boards.
8.
In Arduino the function 'pinMode( )' can be used to configure the Atmega pins as
Correct Answer
B. INPUT_PULLUP
Explanation
The function 'pinMode()' in Arduino can be used to configure the Atmega pins as INPUT_PULLUP. This means that the pin will be configured as an input with a pull-up resistor enabled. This allows the pin to read a HIGH state when it is not connected to anything. This is useful in scenarios where a default HIGH state is desired when the pin is not actively driven by an external device.
9.
In Arduino if 1 second delay is required in a program then which function can be used?
Correct Answer
D. None of the above
Explanation
The correct answer is "None of the above." This is because the options provided do not accurately represent the correct function to use for a 1 second delay in Arduino. The correct function to use for a 1 second delay in Arduino is "delay(1000)" which pauses the program for the specified number of milliseconds.
10.
PWM stands for
Correct Answer
C. Pulse Width Modulation
Explanation
PWM stands for Pulse Width Modulation. It is a technique used to encode information in the width of a pulse in a digital signal. By varying the width of the pulse while keeping the frequency constant, PWM can be used to control the power delivered to a load, such as a motor or a light bulb. This technique is commonly used in applications such as motor control, dimming LED lights, and audio signal processing.
11.
Identify the digital pin which does not have PWM capability.
Correct Answer
B. Digital pin 4
Explanation
Digital pin 4 does not have PWM capability. This means that it cannot generate analog-like signals with varying levels of voltage. PWM (Pulse Width Modulation) is a technique used to control the intensity of digital signals by varying the width of the pulses. However, digital pin 4 does not support this feature, making it the only pin in the given options without PWM capability.
12.
In which language the Arduino IDE is written?
Correct Answer
A. Java
Explanation
The Arduino IDE is written in Java. This is evident from the fact that the IDE requires Java to be installed on the computer in order to run. Java is a popular programming language known for its platform independence and object-oriented approach, making it a suitable choice for developing the Arduino IDE, which is used for programming Arduino boards.
13.
In function 'delay (t)', t is in_____.
Correct Answer
D. Milliseconds
Explanation
In the function 'delay (t)', the parameter t is measured in milliseconds.
14.
If serial port is initialized with Serial.begin(9600), How much time will it take to send two ASCII characters?
Correct Answer
B. 1.667ms
Explanation
The correct answer is 1.667ms. When the serial port is initialized with Serial.begin(9600), it means that the baud rate is set to 9600 bits per second. Each ASCII character is 8 bits long, so to send two ASCII characters, it would take a total of 16 bits. Therefore, the time taken to send two ASCII characters can be calculated as (16 bits / 9600 bits per second) * 1000 milliseconds per second, which equals approximately 1.667 milliseconds.
15.
Which of the following is not a valid data type in Arduino?
Correct Answer
B. Short
Explanation
The data types in Arduino are used to define the type of data that a variable can hold. Void, Short, and String are valid data types in Arduino. However, "Word" is not a valid data type in Arduino. The correct answer is Short.
16.
What is the size of an integer variable in Arduino UNO?
Correct Answer
A. 2 Byte
Explanation
The size of an integer variable in Arduino UNO is 2 bytes. This means that an integer variable in Arduino UNO can store values ranging from -32,768 to 32,767.
17.
Which memory space is used to store the program (sketch) in Arduino?
Correct Answer
B. Flash
Explanation
Flash memory is used to store the program (sketch) in Arduino. Flash memory is a type of non-volatile memory that can be electrically erased and reprogrammed. It is commonly used in microcontrollers, such as Arduino, to store the program code. The program code is stored in the flash memory and remains even when power is turned off. This allows the Arduino to execute the program instructions whenever it is powered on. Therefore, Flash is the correct answer for this question.
18.
How many times 'while (-1)' loop will be executed?
Correct Answer
B. Infinite time
Explanation
The loop 'while (-1)' will be executed an infinite number of times because the condition '(-1)' is always considered true in most programming languages. This means that the loop will continue to run indefinitely until a break statement or some other condition is met to terminate it.
19.
By default a real number is treated as
Correct Answer
B. Double
Explanation
A real number is treated as a double by default because the double data type in programming languages is designed to store floating-point numbers with double precision. It can hold a larger range of values and has a higher precision compared to the float data type. Therefore, when a real number is not explicitly declared as a specific data type, it is assumed to be a double by default.
20.
The keyword used to transfer the control from a called function back to the calling function is_______.
Correct Answer
B. Return
Explanation
The keyword "return" is used to transfer the control from a called function back to the calling function. When a function is called, the control is transferred to the called function and it executes its code. After executing the code, the function can use the "return" keyword to send a value or no value back to the calling function and transfer the control back to it. This allows the calling function to continue its execution from where it left off.
21.
Consider the looping statement 'for(int i=0; i < 10; i =i * 2)' while assuming the body of the loop does not break the loop or change i, how many times would the body of the loop be executed?
Correct Answer
D. Infinite
Explanation
The looping statement "for(int i=0; i < 10; i =i * 2)" will continue to execute indefinitely because the value of i is always being multiplied by 2 in each iteration. This means that i will never reach a value greater than or equal to 10, causing the loop to run infinitely.
22.
Functions are created by first declaring the ________ at the beginning of the program.
Correct Answer
B. Function prototype
Explanation
A function prototype is declared at the beginning of a program to provide a declaration of the function, including its name, return type, and parameters. This allows the compiler to understand the function's signature before it is actually defined. By declaring the function prototype, it informs the compiler about the existence of the function and its expected behavior, enabling the compiler to perform type checking and detect any potential errors or mismatches in the function's usage within the program.
23.
Which loop executes the instructions in loop atleast once?
Correct Answer
B. Do while loop
Explanation
The do-while loop is the correct answer because it is the only loop that guarantees the execution of the instructions at least once. Unlike the other loops, the do-while loop checks the condition at the end of the loop, so even if the condition is initially false, the instructions will still be executed once before the condition is evaluated. This makes it useful in situations where you want to ensure that a certain block of code is executed before checking the condition for further iterations.
24.
Which of the following operator has the highest precedence?
Correct Answer
D. Increment/ decrement (++,- -)
Explanation
The increment and decrement operators (++ and - -) have the highest precedence among the given operators. This means that they are executed first before any other operators in an expression. They are used to increase or decrease the value of a variable by 1.
25.
Which logical operator will return a TRUE value if either of the conditional statements are TRUE?
Correct Answer
B. Logical or (||)
Explanation
The logical operator "Logical or (||)" will return a TRUE value if either of the conditional statements are TRUE. This means that if at least one of the conditions is true, the overall result will be true.
26.
The ability to alter the order in which code is executed is called_____.
Correct Answer
A. Flow control
Explanation
Flow control refers to the ability to change the order in which code is executed in a program. It allows the programmer to determine the sequence of operations and control the flow of execution based on certain conditions or criteria. This can be achieved using conditional statements, loops, and other control structures. Therefore, flow control is the correct term to describe the ability to alter the order of code execution. "Program control" and "direction control" are not commonly used terms in this context.
27.
Which statement can be used inside other control statements to immediately end the loop or statement?
Correct Answer
C. Break
Explanation
The statement "Break" can be used inside other control statements to immediately end the loop or statement. When the "Break" statement is encountered, it terminates the current loop or statement and transfers the control to the next statement after the loop or statement. This allows for the early termination of a loop or statement based on certain conditions, improving the efficiency and control flow of the program.
28.
Which of the following is not an analog function?
Correct Answer
C. AnalogValue()
Explanation
The function AnalogValue() is not an analog function because it is not a standard function in the Arduino programming language. AnalogRead(), AnalogReference(), and AnalogWrite() are all valid analog functions that are used to read analog input, set the reference voltage for analog input, and write analog output respectively.
29.
A function declaration involves establishing the function's _________
Correct Answer
D. All of the above
Explanation
A function declaration involves establishing the function's return data type, the function's name, and the parameters it accepts. The return data type specifies the type of value that the function will return when it is called. The function's name is used to identify and call the function in the program. The parameters are the variables that the function accepts as input when it is called. Therefore, all of the given options are correct as they all play a role in defining a function declaration.
30.
Atmega328 micro-controller has ______________ bytes of flash (Program) memory.
Correct Answer
D. 32K
Explanation
The Atmega328 micro-controller has 32K bytes of flash (Program) memory.
31.
What is the maximum available baudrate in Arduino IDE?
Correct Answer
C. 115200
Explanation
The maximum available baudrate in Arduino IDE is 115200.
32.
The Serial.print() function is used for printing __________________to the connected serial device.
Correct Answer
B. ASCII Characters
Explanation
The Serial.print() function is used for printing ASCII Characters to the connected serial device. This means that when we use this function, we can send characters to the serial device and have them displayed as readable text. It is a useful function for debugging and displaying information in a human-readable format.
33.
What is the correct syntax to initialize serial communication?
Correct Answer
C. Serial.begin(9600)
Explanation
The correct syntax to initialize serial communication is Serial.begin(9600). This function is used to set the data rate in bits per second (baud) for serial data transmission. In this case, the baud rate is set to 9600.
34.
The use of function pinMode() is not required to set pin as an output pin before calling ___________.
Correct Answer
D. AnalogWrite()
Explanation
The use of function pinMode() is not required to set pin as an output pin before calling AnalogWrite(). AnalogWrite() is used to write an analog value (PWM signal) to a specified pin. Unlike DigitalWrite(), which only allows for digital values (HIGH or LOW), AnalogWrite() can write a range of analog values to the pin. The function pinMode() is typically used to set a pin as either an input or output before performing any operations on it. However, in the case of AnalogWrite(), the pin is automatically set as an output pin.
35.
In which of the following the cases the code stops running?
Correct Answer
B. When the power is down
Explanation
The code stops running when the power is down because without power, the device or computer running the code cannot function and execute the instructions. This means that the code cannot continue running and will come to a halt until power is restored.
36.
Arduino IDE is derived from _________.
Correct Answer
B. Wiring & Processing
Explanation
The correct answer is Wiring & Processing. The Arduino IDE is derived from the combination of Wiring, which is a programming framework, and Processing, which is a programming language and development environment. Wiring provides the foundation for the Arduino language and syntax, while Processing provides the graphical user interface and libraries for creating interactive programs.
37.
Atmega328 is a ___________ microcontroller.
Correct Answer
A. 8 bit
Explanation
Atmega328 is a microcontroller that operates on an 8-bit architecture. This means that it can process data and instructions in 8-bit chunks, allowing it to handle a maximum of 2^8 (256) different values. This makes it suitable for applications that require relatively simple processing tasks and do not require the higher processing power provided by 16, 32, or 64-bit microcontrollers.
38.
What is the size of ADC in Arduino Uno?
Correct Answer
B. 10 bit
Explanation
The ADC (Analog-to-Digital Converter) in the Arduino Uno is 10-bit. This means that it can convert an analog input signal into a digital value ranging from 0 to 1023. The 10-bit resolution allows for a higher level of precision when converting analog signals to digital values, compared to lower bit ADCs.
39.
If the microcontroller has 12bit ADC what is the range of analog values we can get?
Correct Answer
C. 0 to 4096
Explanation
The range of analog values we can get from a microcontroller with a 12-bit ADC is 0 to 4096. A 12-bit ADC can represent 2^12 (4096) different values, ranging from 0 to 4095. The 0 value is also included, so the total range is 0 to 4096.
40.
What is Arduino?
Correct Answer
A. Open source prototyping platform based on AVR Microcontrollers.
Explanation
Arduino is an open source prototyping platform that is based on AVR Microcontrollers. This means that it is a platform that allows users to create and develop projects using AVR Microcontrollers, which are a type of microcontroller chip. The fact that Arduino is open source means that the design and code of the platform are freely available for anyone to use, modify, and distribute. This allows for a collaborative and community-driven approach to prototyping and development.
41.
Which controller can be used with Arduino Uno Board?
Correct Answer
D. Both A & C
Explanation
Both A & C are correct answers because the Arduino Uno board can be used with both Atmega 8 and Atmega 328p controllers. The Atmega 8 is an 8-bit microcontroller, while the Atmega 328p is a 32-bit microcontroller. The Arduino Uno board is designed to be compatible with a variety of controllers, allowing users to choose the one that best suits their needs.
42.
How many digital I/O pins are present on the Arduino Uno board?
Correct Answer
B. 14
Explanation
The Arduino Uno board has a total of 14 digital I/O pins. These pins can be configured as either inputs or outputs, allowing the board to interact with various external components such as sensors, buttons, LEDs, and motors. Having a sufficient number of digital I/O pins is important for connecting and controlling multiple devices simultaneously, making the Arduino Uno a versatile and widely used microcontroller board in the field of electronics and programming.
43.
How many analog input pins are present on the Arduino Uno board?
Correct Answer
B. 6
Explanation
The Arduino Uno board has a total of 6 analog input pins. These pins are labeled A0 to A5 and can be used to read analog voltage values.
44.
How many serial ports are available on the Arduino Uno Board?
Correct Answer
A. One
Explanation
The Arduino Uno Board has one serial port available.
45.
How many PWM pins are there on Arduino Uno Board?
Correct Answer
C. 6
Explanation
The correct answer is 6. The Arduino Uno board has 6 PWM (Pulse Width Modulation) pins. PWM pins are used to generate analog output signals by varying the width of the pulse. These pins are labeled as 3, 5, 6, 9, 10, and 11 on the Arduino Uno board. They can be used to control devices such as motors, LEDs, and servos, allowing for precise control over the output signal.
46.
Which of these pins can be used as a PWM pin?
Correct Answer
C. 9
Explanation
Pin 9 can be used as a PWM pin because it is one of the digital pins on the Arduino board that supports Pulse Width Modulation (PWM) output. PWM allows for the control of analog devices using digital signals by varying the width of the pulses. This pin provides the necessary functionality and can be used to control devices such as LEDs, motors, and servos.
47.
What is the frequency of the crystal used in Arduino Uno Board?
Correct Answer
B. 16 MHz
Explanation
The frequency of the crystal used in the Arduino Uno Board is 16 MHz. This crystal is responsible for providing the clock signal to the microcontroller on the board, allowing it to execute instructions at a specific rate. A higher frequency crystal allows for faster processing and execution of code, making the Arduino Uno Board capable of handling more complex tasks efficiently.
48.
What is the maximum voltage level that can be read by any digital pin in Arduino UNO without damaging it?
Correct Answer
C. 5V
Explanation
The maximum voltage level that can be read by any digital pin in Arduino UNO without damaging it is 5V. This is because the Arduino UNO operates on a 5V logic level, meaning it can only interpret voltages as either high (5V) or low (0V). If a voltage higher than 5V is applied to a digital pin, it can potentially damage the pin and the Arduino board. Therefore, it is important to ensure that any input voltage does not exceed 5V when connecting external devices to the Arduino UNO.
49.
Which of these pins can be used to adjust the voltage between 0V & 5V when configured as an OUTPUT?
Correct Answer
C. 9
Explanation
Pin 9 can be used to adjust the voltage between 0V and 5V when configured as an OUTPUT. This is because pin 9 is the analog output pin on many microcontrollers and Arduino boards. By using the analogWrite() function, the voltage on pin 9 can be adjusted to any value between 0 and 5 volts, allowing for precise control over the output voltage.
50.
Which of these pins can be used as RX & TX pins for serial communication in Arduino UNO?
Correct Answer
B. 0&1
Explanation
Pins 0 and 1 can be used as RX and TX pins for serial communication in Arduino UNO. These pins are also known as the hardware serial pins or the UART pins. The RX pin (pin 0) is used for receiving data, while the TX pin (pin 1) is used for transmitting data. These pins are commonly used for communication with other devices such as sensors, displays, or other microcontrollers.