Embedded System Interview Preparation Guide
Download PDF

Embedded Systems Frequently Asked Questions in various Embedded System Interviews asked by the interviewer. So learn Embedded Systems with the help of this Embedded System Interview questions and answers guide and feel free to comment as your suggestions, questions and answers on any Embedded System Interview Question or answer by the comment feature available on the page.

21 Embedded System Questions and Answers:

1 :: Explain What happens when recursion functions are declared inline?

Inline functions property says whenever it will called, it will copy the complete definition of that function. Recursive function declared as inline creates the burden on the compilers execution.

The size of the stack may/may not be overflow if the function size is big.

2 :: Explain Operations involving unsigned and signed? unsigned will be converted to signed?

yes,

void foo(void)
{
unsigned int a = 6;
int b = -20;
(a+b > 6) ? puts("> 6") :
puts("<=6");
}

Here output would give you "> 6". The reason for this is that expressions involving signed and unsigned types have all operands
promoted to unsigned types

3 :: Explain Order of constructor and destructor call in case of multiple inheritance?

constructors top-down, destructors bottom-up.

eg:

in parent's constructor

in child's constructor

in grandchild's constructor

in grandchild's destructor

in child's destructor

in parent's destructor

4 :: Explain What are the features different in pSOS and vxWorks?

Actually theres not much of difference between using psos or vxworks.A few differences in features are:
1.The psos priority is reverse of vxworks.
2.psos supports posix 1003.1 while vxworks it is 1003.1b.
3.In psos device driver architecture is different than vxworks.
4.Also vxworks has interrupt
latency<4.33 microsecs while psos its higher.
Other then these both work in same manner and follow same
architecture.
Also as psos is getting killed no fresh development work is supported by windriver for psos. Also vxworks development environment is much more user friendly then psosenvironment becos vxworks IDE mimics mostly visual studio.

5 :: Explain Difference between object oriented and object based languages?

object based languages doesnt support Inheritance where as object oriented supports. c# is a object oriented language because it supports inheritance and asp.net is not a langugae it is a technology

If the language supports ony 3 features i;e (data encapsulation,data abstraction $ polymorphism).then it is said to be object based programming language. If the language supports all the 4 features i;e(encapsulatio,abstraction,polymorphism $ also inheritance )..then it is said to be object oriented programming language.

6 :: What are the advantages and disadvantages of using macro and inline functions?

Advantage:
Macros and Inline functions are efficient than calling a normal function. The times spend in calling the function is saved in case of macros and inline functions as these are included directly into the code.

Disadvantage:
Macros and inline functions increased the size of executable code.

7 :: Explain Why cannot arrays be passed by values to functions?

Because in C when you say the name of the array it means the address of the first element.
example :
int a[];
func (a);
int func(int a[]);

In this when you call the function by passing the argument a actually &a[0](address of first element) gets passed. Hence it is impossible to pass by value in C.

8 :: Explain what is interrupt latency? How can we reduce it?

interrupt latency is the time required to return from the interrupt service routine after tackling a particular interrupt. We can reduce it by writing smaller ISR routines.

9 :: Explain What are the different qualifiers in C?

1) Volatile:
A variable should be declared volatile whenever its value could change unexpectedly. In practice, only three types of variables could change:
► Memory-mapped peripheral registers
► Global variables modified by an interrupt service routine
► Global variables within a multi-threaded application

2) Constant:
The addition of a 'const' qualifier indicates that the (relevant part of the) program may not modify the
variable.

10 :: Explain What are different qualifiers in C?

1) Volatile:
A variable should be declared volatile whenever its value could change unexpectedly. In practice, only three types of variables could change:
► Memory-mapped peripheral registers
► Global variables modified by an interrupt service routine
► Global variables within a multi-threaded application

2) Constant:
The addition of a 'const' qualifier indicates that the (relevant part of the) program may not modify the
variable.