1. What is the primary purpose of the "volatile" keyword in Arduino programming? A) To store large values B) To reduce memory usage C) To prevent compiler optimizations on shared variables D) To define global constants 2. What happens if you omit pinMode() in the setup() function for a digital output pin? A) The pin defaults to HIGH B) The pin becomes an input C) The pin outputs analog signals D) The sketch will not compile 3. Which function allows you to schedule time-based events without blocking code execution? A) delayMicroseconds() B) analogWrite() C) millis() D) digitalWrite() 4. What type of signal does analogWrite() generate? A) Pure analog voltage B) DC voltage C) PWM (Pulse Width Modulated) signal D) Sine wave 5. Why is it unsafe to use delay() in time-critical applications? A) It causes overheating B) It introduces memory leaks C) It blocks all code execution during the delay D) It resets the microcontroller 6. Which of the following communication protocols is NOT natively supported by most Arduino boards? A) I2C B) SPI C) UART D) CAN 7. What is the typical resolution of analogRead() on most Arduino boards? A) 8-bit B) 10-bit C) 12-bit D) 16-bit 8. In which scenario would using interrupts be most beneficial? A) Reading a temperature sensor every second B) Blinking an LED every 500ms C) Detecting a pushbutton press instantly D) Printing sensor values to the Serial Monitor 9. What is the function of a pull-up resistor? A) Increases current on the output B) Prevents short circuits C) Keeps a digital input HIGH when not actively driven
D) Filters out noise from analog pins 10. What library would you use to control an LCD with an I2C interface? A) LiquidCrystal B) LCDI2C C) Wire D) I2Cdev 11. What would be the best function to determine how long a device has been powered? A) micros() B) delay() C) millis() D) uptime() 12. What is a major limitation of using delay() for timing in Arduino sketches? A) It consumes more RAM B) It allows interrupts to be triggered too often C) It stops all other code from running during the delay D) It requires external clock synchronization 13. Which function should you use to read the number of characters waiting in the serial buffer? A) Serial.read() B) Serial.println() C) Serial.available() D) Serial.flush() 14. When would you typically need to use the attachInterrupt() function? A) To control an LED B) To create software delays C) To detect fast external events D) To create PWM signals 15. What does the Servo.write(angle) function do? A) Writes an angle value to EEPROM B) Sets the PWM duty cycle on a pin C) Rotates the servo motor to the given angle D) Writes data to a serial device 16. What is one disadvantage of using polling instead of interrupts? A) Polling requires more pins B) Polling consumes less power C) Polling may miss fast events D) Polling improves accuracy 17. What must be avoided inside an interrupt service routine (ISR)? A) Pin mode changes B) Using volatile variables C) Serial communication functions D) Reading analog sensors 18. What is the typical duty cycle range for analogWrite() on most Arduino boards? A) 0-5 B) 0-100 C) 0-1023
D) 0-255 19. Which microcontroller is used in the Arduino Uno? A) ATmega2560 B) ATmega328P C) ATtiny85 D) STM32F103 20. How does the Arduino IDE upload code to the board? A) Via SPI B) Over I2C C) Using USB and serial communication D) Through Bluetooth 21. What does Serial.begin(9600); do in an Arduino sketch? A) Initializes analog input B) Enables SPI communication C) Starts serial communication at 9600 baud D) Sets the timer for PWM 22. What does a floating pin mean? A) A pin that is overloaded B) A pin that is internally shorted C) A pin not connected to any voltage and in an undefined state D) A pin used only for analog readings 23. Which of the following motors requires precise control of angular position? A) DC motor B) Brushless motor C) Servo motor D) Linear actuator 24. What is the main difference between Serial.print() and Serial.println()? A) print() prints hex, println() prints binary B) println() adds a newline at the end C) println() is faster than print() D) print() is used only with numbers 25. What does the Wire.begin() function do? A) Starts the SPI bus B) Initializes the I2C bus C) Begins Serial communication D) Starts PWM generation 26. Why might you prefer micros() over millis() in some applications? A) It consumes less memory B) It provides microsecond-level precision C) It avoids interrupts D) It works in sleep mode 27. What is the default logic level for a digital input pin with no external pull-up or pull- down resistor? A) HIGH B) LOW C) FLOATING (undefined)
D) ZERO 28. What Arduino board would be most suitable for projects requiring a large number of I/O pins? A) Arduino Nano B) Arduino Leonardo C) Arduino Mega D) Arduino Micro 29. What happens if you try to draw too much current from an Arduino pin? A) The pin auto-disables B) The board resets C) The microcontroller may be damaged D) Nothing, it's automatically regulated 30. How is a relay typically used in Arduino circuits? A) To increase PWM frequency B) To measure analog voltage C) To control high-voltage circuits using low-voltage signals D) To reduce current draw from the Arduino 31. What is the frequency band used by the HC-05 Bluetooth module? A) 5 GHz B) 1.8 GHz C) 2.45 GHz D) 3.3 GHz 32. What is the maximum range of the HC-05 module? A) 1 meter B) 10 meters C) 100 meters D) 50 meters 33. What is the default baud rate commonly used by HC-05? A) 4800 B) 14400 C) 9600 D) 115200 34. In which mode does the HC-05 module allow configuration through AT commands? A) Sleep Mode B) Command Mode C) Data Mode D) Transfer Mode 35. Which of the following is NOT a valid baud rate for HC-05? A) 19200 B) 38400 C) 74800 D) 57600 36. What is the role of the 'Enable' pin on the HC-05 module? A) Transmit data B) Switch between Command and Data mode
C) Control power D) Reset the device 37. In which mode is the HC-05 used to exchange data with another Bluetooth device? A) Master Mode B) Command Mode C) Data Mode D) Setup Mode 38. What is the function of the Tx pin on the HC-05 module? A) Receives data B) Transmits data serially C) Broadcasts AT commands D) Enables command mode 39. What is the power supply voltage range for the HC-05? A) 3.3V only B) 2V – 3.3V C) 4V – 6V D) 6V – 9V 40. Which pin indicates the operational state of the HC-05 module? A) VCC B) Enable C) State D) Rx 41. What does a sensor do? A) Converts electrical signals into motion B) Converts physical characteristics into electrical signals C) Controls external devices D) Manages power supply 42. Which of the following is NOT a type of sensor? A) Temperature Sensor B) Stepper Motor C) Light Sensor D) Motion Sensor 43. What is one advantage of sensors? A) They require constant calibration B) They provide accurate and timely information C) They are immune to environmental interference D) They eliminate the need for actuators 44. What is one disadvantage of sensors? A) They produce heat B) They may require maintenance and adjustments C) They consume excessive power D) They cannot be automated 45. What is an actuator's main function? A) Convert electrical signals into physical actions B) Sense temperature changes
C) Amplify data from sensors D) Store electrical energy 46. Which type of actuator works by producing rotational motion? A) Linear actuator B) Rotary actuator C) Pneumatic actuator D) Hydraulic actuator 47. What is a major disadvantage of actuators? A) They are immune to wear and tear B) They may consume a lot of power and wear out over time C) They do not need any control D) They replace sensors 48. Which device is used to give output from the system to the environment? A) Sensor B) Actuator C) Processor D) Relay 49. Where is a sensor typically placed in a system? A) At the input port B) At the output port C) In the middle D) After the actuator 50. Which example best illustrates an actuator? A) Thermometer B) Stepper motor C) Light sensor D) Voltage regulator

MCQ INTERNET OF THINGS ARDUINO PROGREAMS - EMBEDDED C TYPES OF ARDUINO

  • 1.
    1. What isthe primary purpose of the "volatile" keyword in Arduino programming? A) To store large values B) To reduce memory usage C) To prevent compiler optimizations on shared variables D) To define global constants 2. What happens if you omit pinMode() in the setup() function for a digital output pin? A) The pin defaults to HIGH B) The pin becomes an input C) The pin outputs analog signals D) The sketch will not compile 3. Which function allows you to schedule time-based events without blocking code execution? A) delayMicroseconds() B) analogWrite() C) millis() D) digitalWrite() 4. What type of signal does analogWrite() generate? A) Pure analog voltage B) DC voltage C) PWM (Pulse Width Modulated) signal D) Sine wave 5. Why is it unsafe to use delay() in time-critical applications? A) It causes overheating B) It introduces memory leaks C) It blocks all code execution during the delay D) It resets the microcontroller 6. Which of the following communication protocols is NOT natively supported by most Arduino boards? A) I2C B) SPI C) UART D) CAN 7. What is the typical resolution of analogRead() on most Arduino boards? A) 8-bit B) 10-bit C) 12-bit D) 16-bit 8. In which scenario would using interrupts be most beneficial? A) Reading a temperature sensor every second B) Blinking an LED every 500ms C) Detecting a pushbutton press instantly D) Printing sensor values to the Serial Monitor 9. What is the function of a pull-up resistor? A) Increases current on the output B) Prevents short circuits C) Keeps a digital input HIGH when not actively driven
  • 2.
    D) Filters outnoise from analog pins 10. What library would you use to control an LCD with an I2C interface? A) LiquidCrystal B) LCDI2C C) Wire D) I2Cdev 11. What would be the best function to determine how long a device has been powered? A) micros() B) delay() C) millis() D) uptime() 12. What is a major limitation of using delay() for timing in Arduino sketches? A) It consumes more RAM B) It allows interrupts to be triggered too often C) It stops all other code from running during the delay D) It requires external clock synchronization 13. Which function should you use to read the number of characters waiting in the serial buffer? A) Serial.read() B) Serial.println() C) Serial.available() D) Serial.flush() 14. When would you typically need to use the attachInterrupt() function? A) To control an LED B) To create software delays C) To detect fast external events D) To create PWM signals 15. What does the Servo.write(angle) function do? A) Writes an angle value to EEPROM B) Sets the PWM duty cycle on a pin C) Rotates the servo motor to the given angle D) Writes data to a serial device 16. What is one disadvantage of using polling instead of interrupts? A) Polling requires more pins B) Polling consumes less power C) Polling may miss fast events D) Polling improves accuracy 17. What must be avoided inside an interrupt service routine (ISR)? A) Pin mode changes B) Using volatile variables C) Serial communication functions D) Reading analog sensors 18. What is the typical duty cycle range for analogWrite() on most Arduino boards? A) 0-5 B) 0-100 C) 0-1023
  • 3.
    D) 0-255 19. Whichmicrocontroller is used in the Arduino Uno? A) ATmega2560 B) ATmega328P C) ATtiny85 D) STM32F103 20. How does the Arduino IDE upload code to the board? A) Via SPI B) Over I2C C) Using USB and serial communication D) Through Bluetooth 21. What does Serial.begin(9600); do in an Arduino sketch? A) Initializes analog input B) Enables SPI communication C) Starts serial communication at 9600 baud D) Sets the timer for PWM 22. What does a floating pin mean? A) A pin that is overloaded B) A pin that is internally shorted C) A pin not connected to any voltage and in an undefined state D) A pin used only for analog readings 23. Which of the following motors requires precise control of angular position? A) DC motor B) Brushless motor C) Servo motor D) Linear actuator 24. What is the main difference between Serial.print() and Serial.println()? A) print() prints hex, println() prints binary B) println() adds a newline at the end C) println() is faster than print() D) print() is used only with numbers 25. What does the Wire.begin() function do? A) Starts the SPI bus B) Initializes the I2C bus C) Begins Serial communication D) Starts PWM generation 26. Why might you prefer micros() over millis() in some applications? A) It consumes less memory B) It provides microsecond-level precision C) It avoids interrupts D) It works in sleep mode 27. What is the default logic level for a digital input pin with no external pull-up or pull- down resistor? A) HIGH B) LOW C) FLOATING (undefined)
  • 4.
    D) ZERO 28. WhatArduino board would be most suitable for projects requiring a large number of I/O pins? A) Arduino Nano B) Arduino Leonardo C) Arduino Mega D) Arduino Micro 29. What happens if you try to draw too much current from an Arduino pin? A) The pin auto-disables B) The board resets C) The microcontroller may be damaged D) Nothing, it's automatically regulated 30. How is a relay typically used in Arduino circuits? A) To increase PWM frequency B) To measure analog voltage C) To control high-voltage circuits using low-voltage signals D) To reduce current draw from the Arduino 31. What is the frequency band used by the HC-05 Bluetooth module? A) 5 GHz B) 1.8 GHz C) 2.45 GHz D) 3.3 GHz 32. What is the maximum range of the HC-05 module? A) 1 meter B) 10 meters C) 100 meters D) 50 meters 33. What is the default baud rate commonly used by HC-05? A) 4800 B) 14400 C) 9600 D) 115200 34. In which mode does the HC-05 module allow configuration through AT commands? A) Sleep Mode B) Command Mode C) Data Mode D) Transfer Mode 35. Which of the following is NOT a valid baud rate for HC-05? A) 19200 B) 38400 C) 74800 D) 57600 36. What is the role of the 'Enable' pin on the HC-05 module? A) Transmit data B) Switch between Command and Data mode
  • 5.
    C) Control power D)Reset the device 37. In which mode is the HC-05 used to exchange data with another Bluetooth device? A) Master Mode B) Command Mode C) Data Mode D) Setup Mode 38. What is the function of the Tx pin on the HC-05 module? A) Receives data B) Transmits data serially C) Broadcasts AT commands D) Enables command mode 39. What is the power supply voltage range for the HC-05? A) 3.3V only B) 2V – 3.3V C) 4V – 6V D) 6V – 9V 40. Which pin indicates the operational state of the HC-05 module? A) VCC B) Enable C) State D) Rx 41. What does a sensor do? A) Converts electrical signals into motion B) Converts physical characteristics into electrical signals C) Controls external devices D) Manages power supply 42. Which of the following is NOT a type of sensor? A) Temperature Sensor B) Stepper Motor C) Light Sensor D) Motion Sensor 43. What is one advantage of sensors? A) They require constant calibration B) They provide accurate and timely information C) They are immune to environmental interference D) They eliminate the need for actuators 44. What is one disadvantage of sensors? A) They produce heat B) They may require maintenance and adjustments C) They consume excessive power D) They cannot be automated 45. What is an actuator's main function? A) Convert electrical signals into physical actions B) Sense temperature changes
  • 6.
    C) Amplify datafrom sensors D) Store electrical energy 46. Which type of actuator works by producing rotational motion? A) Linear actuator B) Rotary actuator C) Pneumatic actuator D) Hydraulic actuator 47. What is a major disadvantage of actuators? A) They are immune to wear and tear B) They may consume a lot of power and wear out over time C) They do not need any control D) They replace sensors 48. Which device is used to give output from the system to the environment? A) Sensor B) Actuator C) Processor D) Relay 49. Where is a sensor typically placed in a system? A) At the input port B) At the output port C) In the middle D) After the actuator 50. Which example best illustrates an actuator? A) Thermometer B) Stepper motor C) Light sensor D) Voltage regulator