Q:

Is there any problem with the following c++ code : char*a=NULL, char& p = *a?

0

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

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Answer:

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

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ Interview Questions For Experienced

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Can I delete pointers allocated with malloc() ijn ... >>
<< Can I free() pointers allocated with new in c++?...