1. how do you allocate memory for an array of integers in C? how do you delete this array
2. what happens if the new operator fails to allocate memory? How do you allocate and delete heap memory in C++?? What error is thrown?
3. what happens if an empty function is recursively called? what is stack overflow?
4. Have you done any exception handling? what are the three things that exception handling assures?
5. How do you print to stderr a int, string and a double? syntax for fprintf?
6. what is a const member function? can you have a function same as the const member function without const in the same class, is this overloading?
7. how do you call a function depending on the object type using a base class pointer?
8. If you design a vending machine class, what public functions would you implement? what idiom separates a handle from the body?
9. what kind of design patterns did you use? what is a bridge pattern?
10. what is a observer pattern? what is its use?
11. what is the difference between multiple threads and multiple processes? what is shared memory?
12. why would you use multiple processes and multiple threads?
13. What is the size of an empty class? does the total sum of sizes of class members equal size of class object? Why not? what is memory alignment?
14. What is a segmentation fault? what happens when you get a segmentation fault? How did you fix seg faults? Did you use any IDE? how does eclipse help you in dealing with seg faults?
15 Did your clients ever complain that the program crashed? Did your QA department report a crash error which is not reproducible?
16. Given a million numbers, what data structure would you use to access an element as fast as you can? (Don't worry about the construction or insertion into the data structure). How do you reduce collisions in a hashmap? what techniques can you use for reducing collisions?
17. What STL containers did you use? what STL algorithms did you use?
18. What QT containers did you use? what is a signal-slot mechanism in QT? how are signals and slots handled in QT?
19. what is the difference between QT containers and STL containers?
20. Did you use IPC? What functionalities does the IPC library provide?
21. What is your knowledge on SQL? what command is used to retrieve number of records from a table in database?
22. Given a log entry every second find if the frequency of a string pattern in the log entry? consider a log entry has a string "IBMSTOCK", find how many times this occurs in a minute of time or the frequency for last one minute?
23. What is your knowledge on Binary trees, linked list, array? analyze their complexities with some specific cases?
24: What is the difference between little endian and big endian?
25:Given a sequence of bits find if it is a palindrome?
26. What is an explicit constructor?
27. Assume I have a function that creates a large object, how would you write the function? (I assume they were expecting something such as an auto_ptr)
28. what does the compiler generate by default?