Showing posts with label OOPS AND OOAD interview questions and answers. Show all posts
Showing posts with label OOPS AND OOAD interview questions and answers. Show all posts

Friday, 7 June 2013

OOPS AND OOAD important questions for UGC NET computer science

                                       C++

1. What is the difference between a pointer and reference?

Ans.: A pointer can both be initialized and assigned whereas
A reference can only be initialized.

Explanation:

int w, *x, &y;
x=&w;

2. When does memory leak occur?

Ans.: Memory leak occurs when the program loses the ability to free a block of dynamically allocated memory.

3. Operators that cannot be overloaded?
Ans.: sizeof  .   .*  .->   ::   ?: