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 . .* .-> :: ?:
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 . .* .-> :: ?: