Oracle company interview questions--c,c++unix

Oracle company interview questions--c,c++unix
1. How to initialize a const member variable in a class?
2. Difference between copy constructor & assignment operator.
3. Use of copy constructor.
4. How to prevent singleton class from being copied?
a. By making a private copy constructor
5. Socket programming. Description about client and server. Steps in making client and server.
6. Static and Dynamic Linking. (DLL)
7. How change the value of a const variable.
8. Different views in Rational Clearcase.
9. exec and fork system calls
10. order of Linear and Binary Search, Explain.
11. Different storage classes in c++
12. How to convert integer into String, which API to use (itoa()).

13. size of instance of A when A is
a. class A{
int I;
};
b. class A{
int I;
static int j;
};
c. class A{
int I;
virtual void print();
}

14. Explain the working (taking into account the use of virtual pointer table) :
Class A{
Int A;
Virtual void print();
};
class B{
int b;
void print();
}
main(){
A *a;
B b;
a=&b;
a->print();
}

15. Benefits of using DLLs.
16. Can static member functions use normal member variables, why or why not?
17. Use of virtual function with examples.
18. How to check for memory leak.
19. What is an inline function?
20. How are the inline functions different from macros?
21. What is the condition when compiler calls inline functions instead of replacing the function call with the function definition?
a. When we make recursive inline functions ( because compiler doesn’t knows the depth of such function call)

No comments: