Category Archives: Embedded Systems Interview Questions

How are variables mapped across to the various memories by the C compiler? | Embedded Systems Questions

The compiler maintains the symbol table which has the related information of all the variable names along with the length of the allocated space, the access unit length for the pointer (type of pointer) and the starting address of the … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

What typecast is applied when we have a signed and an unsigned int in an expression? | Embedded Systems Questions

The unsigned int is typecast into the signed value.

Posted in Embedded Systems Interview Questions | Leave a comment

What do you mean by interrupt latency? | Embedded Systems Questions

Interrupt latency refers to the time taken for the system to start the handler for the specific interrupt. The time from the time of arrival of interrupt to the time it is being handled.

Posted in Embedded Systems Interview Questions | Leave a comment

Explain the properties of a Object oriented programming language. | Embedded Systems Questions

• Encapsulation: The data that are related to the specific object are contained inside the object structure and hidden from the other entities of the environment • Polymorphism: The mechanism by which the same pointer can refer to different types … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

What is the order of calling for the constructors and destructors in case of objects of inherited classes? | Embedded Systems Questions

The constructors are called with base class first order and the destructors are called in the child first order. That is, the if we have 2 levels of inheritance A (base)-> B (inherit 1)-> C (inherit 2) then the constructor … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

What is meant by a forward reference in C? | Embedded Systems Questions

The forward reference refers to the case when we point an address space of a smaller data type with a pointer of a bigger data type This can be pictured as allocating memory in single bytes and accessing it with … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

What does malloc do? What will happen if we have a statement like malloc(sizeof(0)); | Embedded Systems Questions

Malloc is the function that is used for dynamically allocating memory to the different variables. The malloc returns a memory pointer of void type (void *). The statement malloc(sizeof(0)) returns a valid integer pointer because sizeof(0) represents the size of … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

What is the size of the int, char and float data types? | Embedded Systems Questions

The size of the char and int are always dependent on the underlying operating system or firmware. This is limited to the number of address lines in the address bus. The int usually takes up a value of 2 bytes … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

What are recursive functions? Can we make them in line? | Embedded Systems Questions

The recursive functions refer to the functions which make calls to itself before giving out the final result. These can be declared as in-line functions and the compiler will allocate the memory space intended for the first call of the … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment

Write a constant time consuming statement lot finding out If a given number Is a power of 2? | Embedded Systems Questions

If n is the given number, then the expression (n & (n-1)) = 0 gives the logical output depicting if it is a power of 2 or not, if (n & (n-1) == 0) printf (“The given number is a … Continue reading

Posted in Embedded Systems Interview Questions | Leave a comment