This training course schedule can be used a reference for interview review!


1. write C to generate segmentation fault and Stack overflow.


2. give example to use function pointer

Ans: K&R-qsort; or in <a modern approach>: function pointer mostly used as an argument for a method, or it can be an element in a struct, say in uCos to realize OOP in C.

or, In concurrency in OS three easy pieces:

3. which to use in simple embedded systems: arrays or dynamic memory using malloc and why?

Ans:  ,, 

4. when to use volatile

Ans:, or CMPE 244 preet notes

5. How to use Static/Exten, where do they locate, what's problem of a static large array?

Ans: CMPE 244 note,

6. What is different of preemptive and cooperative RTOS?


7. Why not use RTOS?

Ans:, Get by without RTOS

As mentioned in the 2nd paper, it mentioned: for Time-critical aspect, RTOS is negatively affect due to ISR latency, context switch...

8. Compare macro and function.  


9. When to use inline function?


10.  difference between malloc and calloc


11. difference between malloc and new


12. How do you pass variable number of arguments in “C” and why this is a generally bad idea?


13. Diff between struct and union


14. Diff between func(void) and func()


15. Memory errors: memory leak, OutofMemory, ...


16. try/catch in C++


17. Data structures, focus on linked lists, dynamic arrays, trees and graphs. 

Ans: CC150. Hawstein.

18. Remove spaces in a string in C


19. Why cannot use malloc in RTOS?   malloc = BAD! (ARM M3 or MSP430 or 18F4550 have NO MMU, so don't support Virtual Memory)


20. Write a C program to find big or little endian:


21. When to use virtual deconstructor?

Ans: when use polymorphism, such as factory DP:



From Qualcomm interview:

1. How to find the size of one var type without using sizeof()?

Ans: use offsetof() which: size_t size = (size_t)(1 + ((X*)0));

2. Design Circular buffer without STL.,

3. Write C code for convolution. In Baidu, use cuda.


4. what is priority inversion and how it is solved?, or

5. phone interview operating systems- priority inversion, ISR & interrupt vector table, order of complexity of sorting algorithms


6. "Difference between const char * and char const *"

posted @ 2014-06-27 09:42  fxrcode  阅读(513)  评论(0编辑  收藏  举报