This is the list of some of the questions that I was asked during the interview process.
Telephone interview questions
1. Volatile – explain with the scenario where volatile keyword would be used. And other scope variables.
Inheritance
2. Constructor, copy-constructor
3. Multiple constructor and destructor
4. Difference between copy-constructor and overloaded assignment operator
5. Write a program to reverse a string without using in-built functions
6. Assigning value to constant pointer
7. Difference between char pointer and char array
8. Will the size of char pointer and char array the same
9. Allocating memory for 2 dimensional array using malloc
10. More emphasis on pointers
11. OOPS concepts, for example, Inheritance (multiple vs multi-level inheritance)
12. Difference between copy-constructor and overloaded assignment operator
13. What is STL.
14. Exception and error handling
15. Runtime polymorphism with example
16. Problems with multi-threaded programming, how to overcome those
17. Given a scenario, how would come up with class design.
18. Explain any of the design pattern that you are aware of with examples (other than singleton pattern)
19. Difference between thread and process
20. How inter process communication can happen
21. How to debug the program. How to debug a crash
Face to face discussion
Round 1:
1. Static and dynamic libraries
Difference between them
Why do we need static and not use just dynamic?
Is there a change in the binary size(.exe file) depending on the type of library used?
Will the libraries still be required even after the binary is generated?
2. Why any program compiled on Windows system(exe) do not run on Linux/Mac?
3. Explain the steps that happen when we enter a URL in a browser till the webpage is displayed
4. What is VPN? What purpose does it serve?
5. Why do we need to use a proxy server? Uses?
6. Program to find the maximum occurrences of a number in an input sequence.
eg: If input sequence is 1,2,2,3,4,4,3,4, then answer is 3 (4 is repeated 3 times)
Same program, the input sequence can be very large and the each of the numbers can also range from 1-million, then how to calculate.
7. Questions about process and threads, IPC.
Round 2:
1. Consider two sorted arrays A[50] and B[20]. A has 30 elements arranged in the first 30 spaces and B is filled fully with 20 elements. Now merge the elements of B with A in a sorted order in O(n) time complexity.
2. Consider two sorted arrays A[120] and B[100]. Both arrays are filled with elements. Now find the middle most element (220/2 = 110th element) if both arrays were merged in a sorted order without actually creating a new array and merging the two arrays.
3. Can realloc be used to free memory?
4. What is "this" operator? What happens when "delete this" is called in the destructor of a class.
5. In a knockout tournament with 64 teams with two teams competing at a time, how many matches will the winner have to play?
6. In a IPL match with 8 teams, how many matches will the winner have to play?