Nội dung text MCQ_EMBEDDED SYSTEMS.pdf
ChatGPT chat.openai.com/c/066ff964-80a2-466f-8273-7e25f8a53169 1. What is the primary programming language used for Arduino development? A) Java B) Python C) Embedded C D) C++ 2. Which software is commonly used for Arduino programming? A) MATLAB B) Arduino IDE C) Visual Studio D) Eclipse 3. Which operator is used for pointer access in C? A) -> B) . C) :: D) * 4. In Arduino, which function is used to initialize variables and set up the hardware? A) main() B) setup() C) loop() D) initialize() 5. What does the setup() function in Arduino sketch typically include? A) Looping instructions B) Main program logic C) Hardware initialization D) Serial communication 6. Which communication interface is commonly used in Arduino for serial communication? A) SPI EMBEDDED SYSTEMS Way to Polytechnic Unit I
B) I2C C) UART D) GPIO 7. How is the NOT operation represented in Boolean algebra? A) && B) || C) ! D) ~ 8. Which of the following is a bitwise operation in C? A) && B) || C) & D) | 9. What is the purpose of the loop() function in an Arduino sketch? A) Hardware initialization B) Main program logic C) Repeated execution D) Serial communication 10. Which operator is used for compound assignment in C? A) = B) := C) += D) == 11. How are comments written in Arduino sketches? A) // B) # C) /* */ D) 12. Which operator is used for logical AND in C? A) && B) || C) & D) | 13. In Arduino, what is the function of the pinMode() function?
A) Initialize serial communication B) Set the mode of a digital pin C) Define a constant D) Enable interrupts 14. What does the term "bitwise" imply in bitwise operations? A) Working with entire bytes B) Operating on individual bits C) Performing logical operations D) Using boolean variables 15. Which Arduino data type is used to store characters? A) int B) char C) float D) boolean 16. Which statement is used to terminate the execution of a loop prematurely? A) continue B) return C) break D) exit 17. What is the purpose of the Serial.begin() function in Arduino? A) Begin the main program B) Initialize the serial communication C) Set up the loop function D) Define constants 18. Which operator is used for pointer arithmetic in C? A) + B) - C) * D) / 19. What is the result of the expression (5 & 3) in bitwise AND operation? A) 0 B) 1 C) 3 D) 5
20. Which operator is used for dereferencing a pointer in C? A) . B) -> C) * D) & Answers 1. C) Embedded C 2. B) Arduino IDE 3. A) -> 4. B) setup() 5. C) Hardware initialization 6. C) UART 7. C) ! 8. C) & 9. C) Repeated execution 10. C) += 11. A) // 12. A) && 13. B) Set the mode of a digital pin 14. B) Operating on individual bits 15. B) char 16. C) break 17. B) Initialize the serial communication 18. A) + 19. A) 0 20. C) * These questions cover various aspects of Embedded C basics, Arduino IDE, Sketch designing, serial communication, Boolean operations, pointer access operations, bitwise operations, and compounded operations. 1. What is the purpose of control structures in Embedded C? A) Input handling B) Data storage C) Flow control D) Code commenting Unit II Embedded C control structure blocks