What is the difference between Pointer and a Reference?
When you would use them?
Answer Posted / man
Reference is alias of a variable i.e. a constant pointer
which reference to a variable and can not be NULL.
You can not can get the address of ref. They are used as a
variable.
Pointers are variale that hold address of variable and can
be NULL. And can point to any number of variable.
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Should I learn c++ c?
What does the ios::ate argument do?
How java is different from c and c++?
What is the size of a vector?
How to access a variable of the structure?
Do you know the problem with overriding functions?
Out of fgets() and gets() which function is safe to use?
Why do we use iterators?
Can we declare a base-class destructor as virtual?
What is the advantage of c++ over c?
What is object oriented programming (oop)?
What is meant by the term name mangling in c++?
Define vptr.
Show the application of a dynamic array with the help of an example.
Explain mutable storage class specifier.