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 is the difference between new/delete and malloc/free?

1 Answers  


What is a Default constructor?

1 Answers  


Why is c++ is better than c?

0 Answers  


Is c++ a float?

0 Answers  


How do we implement inheritance in c++?

0 Answers  






Who was the creator of c++?

0 Answers  


Define the operators that can be used with a pointer.

0 Answers  


Why for local variables the memory required to hold the variable is allocated from the program stack and for new its allocated from the heap?

1 Answers  


Explain data encapsulation?

0 Answers  


What is diamond problem in c++?

0 Answers  


Define namespace in c++?

0 Answers  


What is object in c++ wikipedia?

0 Answers  


Categories