🧠 Core C Programming (Logic & Concepts)
1. What is a pointer in C?
Answer: A pointer is a variable that stores the address of another variable.
CopyEdit
int a = 10;
int *p = &a; // p points to the address of a
2. What is the difference between call by value and call by reference?
Answer:
Call by value: Passes a copy of the variable (changes don’t affect original).
Call by reference: Passes the address (changes affect the original).
3. What is a dangling pointer?
Answer: A pointer pointing to a memory location that has been freed or deleted.
4. What is the difference between structure and union in C?
Answer:
Structure: Allocates memory for all members.
Union: Allocates memory for the largest member only, shared by all.
5. What is the use of typedef in C?
Answer: Used to create alias names for data types.
CopyEdit
typedef unsigned int uint;
6. Write a C program to reverse a string without using strrev().
CopyEdit
void reverse(char *str) {
int i, len = strlen(str);
for (i = 0; i < len/2; i++) {
char temp = str[i];
str[i] = str[len - i - 1];
str[len - i - 1] = temp;
🔌 Embedded Systems Basics
7. What is an embedded system?
Answer: A specialized computer system designed to perform dedicated functions within a larger
system (e.g., microwave, pacemaker).
8. What is the difference between microcontroller and microprocessor?
Answer:
Feature Microcontroller Microprocessor
Components CPU + RAM + ROM + I/O Only CPU
Applications Embedded systems General computing
9. What is the use of watchdog timer?
Answer: It resets the system if the software becomes unresponsive or hangs.
10. Explain GPIO pin configuration.
Answer: GPIO pins can be configured as input or output to interface with sensors, LEDs, switches,
etc., usually via register settings.
📡 Communication Protocols
11. Explain the differences between I2C, SPI, and UART.
Feature I2C SPI UART
Wires 2 (SDA, SCL) 4 (MISO, MOSI, 2 (TX, RX)
SCLK, SS)
Speed Moderate Fast Moderate
Sync Yes Yes No
Devices Multiple Multiple (limited) Point-to-point
12. What is DMA?
Answer: Direct Memory Access allows peripherals to access memory without involving the CPU,
increasing performance.
⚙️ RTOS & Real-Time Concepts
13. What is an RTOS?
Answer: A real-time operating system is designed to process data and respond within a strict time
deadline.
14. What are semaphores and mutex?
Answer:
Semaphore: Signaling mechanism used to control access to a shared resource.
Mutex: Mutual exclusion, used for locking resources between threads.
15. Difference between task, process, and thread?
Answer:
Task (RTOS): A basic unit of work (like a lightweight thread).
Thread: A lightweight sub-process sharing the same memory.
Process: An independent program with its own memory.
💻 Memory & Optimization
16. What is stack vs heap memory?
Answer:
Stack: Used for static memory allocation (function calls, local vars).
Heap: Used for dynamic memory (malloc, free).
17. What is memory leak?
Answer: When memory is allocated but not properly deallocated (free), causing the program to use
more and more RAM over time.
🛠️ Debugging & Development
18. How do you debug embedded code?
Answer:
Using JTAG/SWD debugger
UART/Serial log outputs
LEDs for status indication
Simulation and emulation tools
19. What tools do you use for development?
Answer:
Keil, MPLAB, STM32CubeIDE, IAR, Atmel Studio
Hardware: Oscilloscope, Logic analyzer, Multimeter
Protocol analyzer for I2C/SPI/UART
📁 Project-Based Questions
20. Explain your academic project.
Answer Format:
What problem it solves
Hardware/software used (mention MCU, language, tools)
Communication protocol (if any)
Your role (coding, testing, circuit, etc.)
🗣️ HR Round Questions
21. Tell me about yourself.
Answer Tip: Start with your education, project work, any internship, technical interests, and
strengths.
22. Why do you want to join HCL?
Answer: HCL is a leading tech company with global opportunities, strong embedded systems
projects, and a learning-friendly environment where I can grow technically and contribute
meaningfully.
23. Are you ready to relocate or work in any domain?
Answer: Yes, I am flexible and open to relocate or work in any domain where I can learn and
contribute.
24. What are your strengths and weaknesses?
Answer:
Strengths: Quick learner, strong in C, good at debugging.
Weakness: Sometimes overthink logic—but I’m improving by writing more clean code.
25. Where do you see yourself in 5 years?
Answer: I see myself as a key embedded system developer, possibly leading a team, contributing to
real-time products, and continuing to grow in software-hardware integration.