Is there any problem with the following:

char *a=NULL; char& p = *a;?



Is there any problem with the following: char *a=NULL; char& p = *a;?..

Answer / neelam saini

The result is undefined. You should never do this. A reference must always refer to some object.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C++ General Interview Questions

What are static member functions?

0 Answers  


What issue do auto_ptr objects address?

2 Answers  


Explain pass by value and pass by reference.

0 Answers  


Do inline functions improve performance?

0 Answers  


What is using namespace std in c++?

0 Answers  






Define 'std'.

0 Answers  


What is c++ try block?

0 Answers  


Explain the difference between abstract class and interface in c++?

0 Answers  


Define friend function.

0 Answers  


What is function declaration in c++ with example?

0 Answers  


Explain polymorphism?

0 Answers  


What is else syntax in c++?

0 Answers  


Categories