


















































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















































































Question 1. Which Broadcom SoC component on the Raspberry Pi 4 is primarily responsible for hardware video decoding? A) CPU (Cortex‑A72) B) GPU (VideoCore VI) C) VPU (Video Processing Unit) D) DSP (Digital Signal Processor) Answer: B Explanation: The VideoCore VI GPU handles hardware‑accelerated video decoding and graphics rendering on the Pi 4. Question 2. The Raspberry Pi 5 introduced which of the following improvements over the Pi 4? A) Dual‑core ARM Cortex‑A53 CPU B) USB‑C power input limited to 2 A C) Integrated LPDDR5 memory up to 8 GB D) Removal of the 40‑pin GPIO header Answer: C Explanation: The Pi 5 supports LPDDR5 RAM, providing higher bandwidth and capacity up to 8 GB. Question 3. When selecting a Compute Module (CM) for an industrial application, which factor is most critical compared to a standard Raspberry Pi board? A) Presence of HDMI port B) Availability of a built‑in Wi‑Fi antenna C) Ability to integrate into a custom carrier board D) Inclusion of a 3.5 mm audio jack Answer: C
Explanation: Compute Modules are designed to be soldered onto custom carrier boards, enabling bespoke hardware designs. Question 4. Which video interface on the Raspberry Pi uses a ribbon cable and is intended for connecting a camera module? A) HDMI B) DSI C) CSI D) VGA Answer: C Explanation: The Camera Serial Interface (CSI) uses a thin ribbon cable to connect Pi camera modules. Question 5. What is the maximum theoretical bandwidth of a USB 3.0 port on the Raspberry Pi 4? A) 480 Mbps B) 5 Gbps C) 10 Gbps D) 20 Gbps Answer: B Explanation: USB 3.0 (SuperSpeed) provides up to 5 Gbps of raw bandwidth. Question 6. Which power supply specification is required for a Raspberry Pi 4 operating with a 4 GB RAM model under load? A) 5 V / 2 A via micro‑USB B) 5 V / 3 A via USB‑C Power Delivery
A) BCM 4 (Physical 7) B) BCM 12 (Physical 32) C) BCM 18 (Physical 12) D) BCM 22 (Physical 15) Answer: C Explanation: BCM 18 (physical pin 12) provides hardware PWM channel 0. Question 10. For reliable booting, a microSD card used with Raspberry Pi OS should be at least Class ___? A) 2 B) 4 C) 6 D) 10 Answer: D Explanation: Class 10 cards guarantee a minimum sustained write speed of 10 MB/s, reducing boot latency and corruption risk. Question 11. During the Raspberry Pi boot sequence, which component runs first? A) GPU firmware B) Bootloader in EEPROM C) Linux kernel D) Userland init system Answer: B Explanation: The on‑board boot ROM loads the second‑stage bootloader from the EEPROM, which then initiates the GPU firmware.
Question 12. Which boot method allows a Raspberry Pi 4 to start without a microSD card? A) Network PXE boot via Ethernet B) Boot from a SATA HDD attached to the GPIO pins C) Boot from a Bluetooth flash drive D) Boot from an internal NAND memory Answer: A Explanation: The Pi 4 supports network (PXE) boot over Ethernet, enabling diskless operation. Question 13. Which Raspberry Pi OS image is most suitable for a headless IoT sensor node? A) Raspberry Pi OS with Desktop (64‑bit) B) Raspberry Pi OS Lite (32‑bit) C) Raspberry Pi OS Full (with LibreOffice) D) Raspberry Pi OS Media Center Answer: B Explanation: The Lite version lacks a graphical desktop, reducing resource usage for headless deployments. Question 14. In raspi‑config, which menu option configures the Pi’s locale and timezone? A) System Options → Wireless LAN B) Localisation Options → Change Locale C) Interface Options → SSH D) Advanced Options → Overclock Answer: B Explanation: The “Localisation Options” submenu lets you set locale, keyboard layout, and timezone.
Explanation: The /etc/sudoers file (or a file under /etc/sudoers.d) defines sudo permissions. Question 18. Which APT command will both update the package index and upgrade all installed packages in a single step? A) apt update && apt upgrade B) apt full‑upgrade C) apt-get dist‑upgrade D) apt‑refresh‑all Answer: B Explanation: “apt full-upgrade” updates the package list and performs a distribution‑style upgrade in one command. Question 19. When configuring a static IP address on Raspberry Pi OS using dhcpcd.conf, which line specifies the router (gateway) address? A) static ip_address=192.168.1.10/ B) static routers=192.168.1. C) static domain_name_servers=8.8.8. D) static broadcast_address=192.168.1. Answer: B Explanation: The “static routers” directive defines the default gateway. Question 20. Which firewall utility is pre‑installed on Raspberry Pi OS and can be enabled with “sudo ufw enable”? A) iptables B) firewalld C) nftables
D) ufw (Uncomplicated Firewall) Answer: D Explanation: ufw provides a simplified interface to iptables and is included by default. Question 21. Which command schedules a Python script to run at system boot using crontab? A) @reboot python3 /home/pi/script.py B) */5 * * * * python3 /home/pi/script.py C) 0 0 * * * python3 /home/pi/script.py D) @daily python3 /home/pi/script.py Answer: A Explanation: The “@reboot” time spec in crontab runs the command once each time the system starts. Question 22. By default, which version of Python is installed on Raspberry Pi OS (2023‑xx release)? A) Python 2.7 only B) Python 3.9 only C) Both Python 2.7 and Python 3. D) Python 3.11 only Answer: C Explanation: Raspberry Pi OS includes both Python 2 (legacy) and Python 3 (default) interpreters, though Python 2 is deprecated. Question 23. Which command creates an isolated Python virtual environment named “env” in the current directory? A) python3 - m venv env
Question 26. When using gpiozero’s LED class, which method turns the LED off? A) led.toggle() B) led.on() C) led.off() D) led.close() Answer: C Explanation: The off() method sets the output low, turning the LED off. Question 27. Which Python library provides a high‑level abstraction for reading I2C sensor data on the Raspberry Pi? A) spidev B) smbus C) pyserial D) picamera Answer: B Explanation: smbus2 (or smbus) offers a convenient API for I2C communication. Question 28. In an I2C bus, what is the maximum number of unique 7‑bit device addresses that can be assigned? A) 7 B) 32 C) 128 D) 256 Answer: C Explanation: 7‑bit addressing yields 2⁷ = 128 possible unique addresses (some reserved).
Question 29. Which command enables the SPI kernel module on a Raspberry Pi without using raspi‑config? A) sudo modprobe spi‑bcm B) sudo dtparam=spi=on C) sudo apt‑install spi‑tools D) sudo raspi‑config nonint do_spi 0 Answer: B Explanation: Adding “dtparam=spi=on” to /boot/config.txt activates the SPI interface. Question 30. The primary UART (ttyAMA0) on the Raspberry Pi 4 is mapped to which GPIO pins? A) BCM 14 (Tx) and BCM 15 (Rx) B) BCM 0 (Tx) and BCM 1 (Rx) C) BCM 4 (Tx) and BCM 5 (Rx) D) BCM 27 (Tx) and BCM 28 (Rx) Answer: A Explanation: The primary UART uses BCM 14 (GPIO 14, physical 8) for TX and BCM 15 (GPIO 15, physical 10) for RX. Question 31. Which Python library is commonly used to capture still images from the Raspberry Pi camera via libcamera? A) picamera B) opencv‑python C) pygame D) pyqt Answer: A
D) Allow password authentication for all users. Answer: C Explanation: Changing the default port reduces automated brute‑force attacks, though it should be combined with key‑based auth and disabled root login. Question 35. The “rainbow square” LED pattern on a Raspberry Pi indicates which condition? A) Normal boot sequence B) Insufficient power (brownout) C) Overheating CPU D) SD‑card read error Answer: B Explanation: A rainbow of colors on the power LED signals a voltage drop below the required level. Question 36. Which command displays the most recent kernel messages, useful for diagnosing hardware failures? A) dmesg B) journalctl - b C) lsmod D) cat /proc/cpuinfo Answer: A Explanation: dmesg prints the kernel ring buffer containing boot and hardware logs. Question 37. To monitor the CPU temperature on a Raspberry Pi from the command line, which file should be read? A) /sys/class/thermal/thermal_zone0/temp
B) /proc/temperature C) /var/log/cpu_temp.log D) /etc/cpu_temp.conf Answer: A Explanation: The temperature is exposed as an integer in millidegrees Celsius in that sysfs file. Question 38. Which of the following passive cooling solutions is most effective for a Raspberry Pi 4 under sustained 80 % CPU load? A) Small metal case without vents B) Heat‑sink only on the SoC C) Heat‑sink plus a 40 mm fan D) Thermal paste on the GPIO pins Answer: C Explanation: Combining a heat‑sink with active airflow (fan) provides the best thermal dissipation under heavy load. Question 39. In fail2ban, which default jail protects SSH against repeated login failures? A) ssh‑attack B) sshd‑monitor C) ssh‑d D) sshd Answer: D Explanation: The “sshd” jail watches /var/log/auth.log for repeated failed SSH attempts and bans offending IPs.
Question 43. Which UART configuration parameter sets the number of stop bits to 2? A) parity=none B) stopbits= C) bytesize= D) timeout= Answer: B Explanation: The stopbits attribute defines how many stop bits are used; setting it to 2 creates two stop bits. Question 44. Which command installs the SQLite development libraries required to compile Python’s pysqlite module on Raspberry Pi OS? A) sudo apt install sqlite3 libsqlite3-dev B) sudo apt install sqlite-dev C) sudo pip install sqlite D) sudo apt install python‑sqlite3‑dev Answer: A Explanation: The package “libsqlite3-dev” provides headers needed for building SQLite extensions. Question 45. In a Flask web application running on a Raspberry Pi, which decorator registers a function to handle HTTP GET requests to the URL “/status”? A) @app.route('/status', methods=['POST']) B) @app.get('/status') C) @app.route('/status', methods=['GET']) D) @app.handle('/status')
Answer: C Explanation: The route decorator with methods=['GET'] maps GET requests to the function. Question 46. Which command retrieves JSON data from a remote REST API and saves it to a file named “data.json”? A) curl - s http://api.example.com/data > data.json B) wget - O data.json http://api.example.com/data C) both A and B are correct D) ping - c 1 api.example.com > data.json Answer: C Explanation: Both curl and wget can fetch the resource and redirect output to a file. Question 47. Which Dockerfile instruction copies the local “requirements.txt” into the container’s working directory? A) ADD requirements.txt. B) COPY requirements.txt /app/ C) MOVE requirements.txt. D) INSERT requirements.txt. Answer: B Explanation: The COPY instruction copies files from the build context into the image. Question 48. To limit the maximum number of concurrent SSH sessions on a Raspberry Pi, which configuration file should be edited? A) /etc/ssh/sshd_config B) /etc/ssh/ssh_config C) /etc/security/limits.conf
A) To generate PWM on any GPIO pin without restrictions B) To achieve higher frequency and lower jitter C) To avoid needing root privileges D) To enable PWM on the 5 V rail Answer: B Explanation: The hardware PWM driver provides stable timing and higher frequencies than software implementations. Question 52. When using the gpiozero library, which class would you use to control a servo motor? A) LED B) Servo C) Motor D) PWMOutputDevice Answer: B Explanation: gpiozero’s Servo class abstracts the PWM signals required for hobby servos. Question 53. Which command lists all active systemd services on a Raspberry Pi? A) systemctl list‑units --type=service --state=running B) service --status-all C) initctl list D) rc-status Answer: A Explanation: systemctl with those options displays running services managed by systemd.
Question 54. Which of the following is the correct syntax to add a static route for network 10.0.0.0/24 via gateway 192.168.1.1 using the ip command? A) ip route add 10.0.0.0/24 via 192.168.1. B) ip route set 10.0.0.0/24 gw 192.168.1. C) route add - net 10.0.0.0 netmask 255.255.255.0 gw 192.168.1. D) ifconfig 10.0.0.0 netmask 255.255.255.0 gw 192.168.1. Answer: A Explanation: “ip route add … via …” is the modern iproute2 syntax for static routes. Question 55. Which of the following steps is required to enable the Pi Camera using libcamera on Raspberry Pi OS Bullseye? A) Add “dtoverlay=vc4‑kms‑v3d” to config.txt B) Run “sudo raspi‑config” → Interface Options → Camera → Enable C) Install the “camera‑support” package via apt D) No action; the camera is enabled by default Answer: B Explanation: The Camera interface must be enabled via raspi‑config or by adding “start_x=1” and “gpu_mem” to config.txt. Question 56. Which of the following is the correct way to start a Docker container in detached mode, mapping host port 8080 to container port 80? A) docker run - d - p 8080:80 myimage B) docker start - d - p 8080:80 mycontainer C) docker exec - d - p 8080:80 myimage D) docker compose up - d 8080: Answer: A