Pointers viva interview Questions

Pointers viva interview Questions

Q.) List out the two uses for the & and * operator and also how they differ.

Q.) List out the important characteristics of OOP.

Q.) Differentiate between a class and an object. Give an example.

Q.) What are pointers?

Q.) What is the relationship between arrays and pointers?

Q.) Should we use reference variables or pointers? Can we use references everywhere instead of pointers?

Q.) Why is it better to pass by reference than by value?

Q.) Differentiate between the use of ‘public’ and ‘private’ in classes.

Q.) Is it that we should always make data private and functions public?

Q.) Explain constructors and destructors in classes and why they are needed.

Q.) How many constructors and destructors can a class have? Can we overload destructors?

Q.) What is a default constructor?

Q.) Which method of accessing arrays is more efficient/ faster? (indexing or pointer accessing).

Q.) When we pass 2-D arrays to a function why do we need to specify the 2nd dimension in the function declaration?

Q.) What is a copy constructor? Should we pass the argument to the copy constructor only by reference? Why?

Q.) Does implicit conversion occur only when the class has a single-argument constructor?


0 comments:

Post a Comment