27 real Embedded C & Firmware questions from the Embedded Systems bank, as asked in Indian campus drives and tech interviews. Every question has a verified answer and an AI-tutor explanation on placd — free to start.
1. What is volatile qualifier?
Junior
A.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
B.file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
C.combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
D.byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian
2. Which term means: "tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops"?
A.volatile qualifier — keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
B.volatile qualifier — combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
C.volatile qualifier — file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
D.volatile qualifier — tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
A.property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
B.keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
C.combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
D.byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian
5. Which term means: "combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access"?
A.const volatile — keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
B.const volatile — byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian
C.const volatile — combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
D.const volatile — reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main
A.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
B.property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
C.guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
D.set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
8. Which term means: "set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts"?
A.Bit manipulation macros — property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
B.Bit manipulation macros — set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
C.Bit manipulation macros — combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
D.Bit manipulation macros — tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
A.byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian
B.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
C.guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
D.property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
11. Which term means: "byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian"?
A.Endianness — combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
B.Endianness — byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian
C.Endianness — keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
D.Endianness — set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
A.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
B.set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
C.property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
D.keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
14. Which term means: "keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry"?
A.ISR rules — guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
B.ISR rules — file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
C.ISR rules — keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
D.ISR rules — property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
A.set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
B.guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
C.file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
D.reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main
17. Which term means: "reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main"?
A.Startup code — set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
B.Startup code — file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
C.Startup code — combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
D.Startup code — reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main
A.keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
B.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
C.property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
D.file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
20. Which term means: "file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits"?
A.Linker script — file defining memory regions and output sections that places .text in flash and .data/.bss in RAM, exporting symbols the startup code uses for copying and stack limits
B.Linker script — set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
C.Linker script — guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
D.Linker script — tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
A.byte order of multi-byte values in memory; little-endian stores the least significant byte first and is used by ARM Cortex-M and x86, while network byte order is big-endian
B.combination used for a read-only hardware register such as a status register: firmware must never write it, yet the compiler must re-read it on every access
C.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
D.property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
23. Which term means: "property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines"?
A.Reentrancy — keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
B.Reentrancy — tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
C.Reentrancy — property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
D.Reentrancy — reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main
A.set with reg |= (1U << n), clear with reg &= ~(1U << n), toggle with ^=, always using unsigned constants to avoid sign extension and undefined shifts
B.tells the compiler a variable may change outside normal program flow, forcing every access to go to memory, required for hardware registers, ISR-shared flags and busy-wait loops
C.guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
D.reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main
26. Which term means: "guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap"?
A.Stack overflow detection — property of a function that can be interrupted and safely called again before it finishes, requiring no static or global mutable state and no calls to non-reentrant library routines
B.Stack overflow detection — reset handler that copies .data from flash to RAM, zeroes .bss, sets the stack pointer and vector table, initialises clocks and then calls main
C.Stack overflow detection — guarding the task stack with a canary pattern, an MPU guard region or high-water-mark measurement, because overflow shows up later as random hard faults or corrupted heap
D.Stack overflow detection — keep handlers short, never block or call malloc and printf, share data through volatile variables or queues, and clear the interrupt flag to prevent immediate re-entry
Answers, AI explanations, and a free readiness check
Sign up free to check your answers with explanations, ask the AI tutor anything on any question, and take the free 2-minute readiness check for a scored result. The full AI mock interview, scored like a real panel, unlocks with Pro.