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
What is c++ array?
What is the difference between a "copy constructor" and an "assignment operator" in C++?
What do you mean by inheritance in c++?
How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?
Define token in c++.
What kind of problems can be solved by a namespace?
What is dynamic and static typing?
What is the difference between structures and unions?
What are the extraction and insertion operators in c++? Explain with examples.
Is there finally in c++?
How are virtual functions implemented in c++?
What is auto type c++?
What is iterator in c++?
Mention the purpose of istream class?
What is a hashmap c++?