10+ Embedded C Interview Questions and Answers

Embedded C Interview Questions and Answers

Are you searching for embedded C interview questions? Below, we have mentioned the some of frequently asked Embedded C  interview questions & answers for candidates to get their way and pass the job interview easily.

Top Embedded C Interview Questions and Answers

Q1. What do you know about Embedded C?

It is an extension in C language which is used to program electronic gadgets. Each processor used in an electronic system (e.g. mobile phone, washing machine, digital camera) is linked with embedded software.

Q2. What is an Embedded System?

It is a system that consists of hardware, application software and a real-time operating system. It can be a small independent system or large combinational system.

Q3. What is a volatile Keyword?

It is a qualifier that is applied to a variable when it is declared. It is used to inform the compiler that the value of the variable may change at any time.

Syntax of C’s volatile Keyword: volatile rid15_t x; 

Q4. Is it possible to have a volatile pointer?

Yes, it is possible to create a volatile pointer in C language.

// piData is a volatile pointer to an integer.

int * volatile piData;

Q5. Tell me the place to use the volatile keyword?

A volatile is an important qualifier in C programming. Below we have mentioned some places where we need to use the volatile keyword.

  • Accessing the memory-mapped peripherals register or hardware status register.
  • Sharing the global variables or buffers between the multiple threads.
  • Accessing the global variables in an interrupt routine or signal handler.

Q6. What do you mean by ISR?

ISR (Interrupt Service Routines) are procedures which are stored at specific memory addresses which are called when a certain type of interrupt happens. The Cortex-M processors family has the NVIC which is responsible to manage the execution of the interrupt.

Q7. What is interrupt latency?

Interrupt latency is nothing but the number of clock cycles that are taken by the processor to give a response to an interrupt request. It is count between the assertions of the interrupt request and the first instruction of the interrupt handler.

Q8. How can we decrease the interrupt latency?

The interrupt latency depends on many factors such as:

  • Platform and interrupt controller.
  • CPU clock speed.
  • Timer frequency
  • Cache configuration.
  • Application program.

With the precise selection of platform and processor,  we can easily decrease the interrupt latency. And, also by making the ISR shorter and avoid calling a function within the ISR.

Q9. What do know about stack overflow?

It is a condition in which a program tends to access beyond the limit of the available stack memory. If stack overflow happens, the program can crash or you can say that segmentation fault that is the result of the stack overflow.

Q10. Tell me the size of a character, integer, integer pointer, character pointer?

  • The size of a character is 1 byte.
  • Size of an integer is 4 bytes.
  • Size of integer pointer and character is 8 bytes on a 64-bit machine and 4 bytes on a 32-bit machine.

Q11. Tell me the return type of ISR?

ISR does not return anything because there is no caller in the code to read the returned values.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top