GENERAL INTERVIEWS QUESTIONS

1. What is the difference between #include and #include "file"?
2. What is the benefit of using an enum rather than a #define constant?
3. How can I open a file so that other programs can update it at the same time?
4. What is hashing?
5. What is the quickest sorting method to use?
6. when should the volatile modifier be used?
7. When should the register modifier be used? Does it really help?
8. What is page thrashing?
9. How can you determine the size of an allocated portion of memory?
10.Can static variables be declared in a header file?
11.How do you override a defined macro?
12.How can you check to see whether a symbol is defined?
13.Can you define which header file to include at compile time?
14.Can a variable be both const and volatile?
15.Can include files be nested?
16.Write the equivalent expression for x%8?
17.When does the compiler not implicitly generate the address of the first element of an array?
18.What is the benefit of using #define to declare a constant?
19.How can I search for data in a linked list?
20.Why should we assign NULL to the elements (pointer) after freeing them?
C++ Interview Questions and Answers
1. What is virtual constructors/ destructors?
2. What do you mean by inline function?
3. Difference between realloc() and free()?
4. What is a template?
5. What is the difference between class and structure?
6. What is RTTI?
7. What is encapsulation?
8. What is an object?
9. What is public, protected, private?
10 What is namespace?
11. What do you mean by inheritance?
12. What is function overloading and operator overloading?
13. What is virtual class and friend class?
14. What do you mean by binding of data and functions?
15. What is the difference between an object and a class?
16. What is a class?
17. What is friend function?
18. What is abstraction?
19. What are virtual functions?
20. What is a scope resolution operator?
21. What do you mean by pure virtual functions?
22. What is polymorphism? Explain with an example?
ANSWERS TO ABOVE QUESTIONS
SOURCE:http://www.coolinterview.com

No comments: