Embedded System Interview Questions. Part II
x86 interview questions
- What does microprocessor speed depend on?
- Is the address bus unidirectional?
- Is the data bus is Bi-directional?
- What is the difference between microprocessor and microcontroller?
- Why does microprocessor contain ROM chips?
- Difference between static and dynamic RAM?
- What is interrupt?
- What is cache memory?
- What is stack?
- Can ROM be used as stack?
- What is NV-RAM?
C Interview Questions
- What is the difference between malloc() and calloc() ?
- write C code for deleting an element from a linked listy traversing a linked list efficient way of elimiating duplicates from an array
- Can structures be passed to the functions by value?
- Why cannot arrays be passed by values to functions?
- Advantages and disadvantages of using macro and inline functions?
- What happens when recursion functions are declared inline?
- What is the Scope of static variables?
- What is the output of printf("\nab\bcd\ref");
- #define cat(x,y) x##y concatenates x to y. But cat(cat(1,2),3) does not expand but gives preprocessor warning. Why?
- Can you have constant volatile variable? Yes, you can have a volatile pointer?
- ++*ip increments what? (A: it increments what ip points to)
- Operations involving unsigned and signed — unsigned will be converted to signed
- What does a+++b mean (A: (a++)+b)
- what will malloc(sizeof(0)) return? (A : valid pointer)
- What will malloc(0) return ? (A: . If the size of the space requested is 0, the behavior is implementation-defined: the value returned shall be either a null pointer or a unique pointer.)
- Declare a Array of pts to functions ? (A: void (*fptr[10])() )
- Which way of writing infinite loops is more efficient than others?
- # error — what it does?
- How is function itoa() written?
- Who to know wether systemuses big endian or little endian format and how to convert among them?
- What is interrupt latency?
- How is generic list manipulation function written which accepts elements of any kind?
- What is the difference between hard real-time and soft real-time OS?
- What is interrupt latency? How can you recuce it?
- What is the differnce between embedded systems and the system in which rtos is running?
- How can you define a structure with bit field members?
- What are the features different in pSOS and vxWorks?
- How do you write a function which takes 2 arguments - a byte and a field in the byte and returns the value of the field in that byte?
- What is a cache?
- What's the difference between Write-Through and Write-Back Caches? Explain advantages and disadvantages of each.
- What is Cache Coherency?
- In Vxworks, how to solve Cache Coherency problems? (A: Using cacheFlush() and cacheInvalidate() .The routines cacheFlush( ) and cacheInvalidate ( ) are used to manually flush and invalidate cache buffers. Before a device reads the data, flush the data from the cache to RAM using cacheFlush( ) to ensure the device reads current data. After the device has written the data into RAM, invalidate the cache entry with cacheInvalidate( ). This guarantees that when the data is read by the CPU, the cache is updated with the new data in RAM.)