EMBEDDED C INTERVIEW QUESTIONS

Q1. Describe the function  of the volatile keyword in embedded C?

 

A1. It’s job is to tell the compiler that a variable should not be optimised.

  • It should be used only when there can be sudden change of the value of that particular variable.
  • Quite useful for the registers that are memory mapped.

Q2. Is it possible to declare a variable as both a constant and a volatile variable?

 

A2. Yes it woul bd make sense that the compiler wants to keep the volatile variable constant.

  • However the value can be altered through external intervention.

Q3. Describe what is a null pointer?

A3. It is one of the popular macros used in c programming.

  • It does not indicate any valid memory location.Hence it is used to find out whether a particular memory address is valid or not.

Q4,. State the size of integer, pointer, and their corresponding pointers?

A4. The corresponding sizes are as follows:-

  1. Integer – 4 bytes
  2. Character – 1 byte
  3. Integer pointer – 8 bytes on 64 bit machine and 4 bytes on 32 bit machine
  4. Character pointer – 8 bytes on 64 bit machine and 4 bytes  on 32 bit machine.

Q5. Describe what is an ISR in Embedded C?

A5. It is essentially a subroutine that is activated whenever an interrupt is encountered in the main program.

Q6. Is the printf statement applicable within the interrupt routine?

 

A6. It is not employed within a service routine as it is thread damaging, and employs dynamic memory location.

  • It could have a negative effect on the time of ISR and even latency.

Q7. Describe what are inline functions?

A7. These function are usually used in the ARM architecture.

  • They are essentially small functions with small definitions.
  • Function body takes effect in each call to inline function.

Q8.Describe whats is an RTOS?

A8. It is a.k.a Real time Operating System.

  • It comprises of an useful component known as the scheduler:- It organises which process to be executed on the processor based on priorities assigned by the user.
  • Multitasking is efficient based on the number of cores of processor and optimisation.

Main features:

  • Kernel preemption should be available.
  • The dispatch latency of the interrupt should be shortened
  • The latency taken for switching context must be short
  • The multiple  processes taking place within the RTOS  should be both reliable as well as time efficient.

About Us: Professional Training Institute is one of the top Embedded System training Institute in Bangalore, Our unique training practical based training approach makes every student as knowledgeable and experienced. Our student Practical hands on training in Embedded system makes student employable. And also till now are having 100% placement records in our Embedded system.

Read our Google review here and see what our past student are saying about us.
review link –  https://goo.gl/oQ1STh