- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Difference Between Pointer and Reference
In this post, we will understand the difference between pointer and reference.
It can be initialized to any value.
It can be initialized any time after its declaration.
It can be assigned to point to a NULL value.
It can be dereferenced using the ‘*’ operator.
It can be changed to point to a different variable of the same type only.
int val = 5; //code// int *p = &val;
It has to be initialized when it is declared.
It can’t be a NULL value.
It can be used by a name.
Once it has been initialized to a variable, it can’t be changed to refer to a variable object.
int val = 52; int &ref = val;
- What is difference between a pointer and reference parameter in C++?
- Difference Between Array and Pointer
- Difference between pointer and array in C
- Explain reference and pointer in C programming?
- Difference between OSI and TCP/IP Reference Model
- Difference between Call by Value and Call by Reference
- What are the differences between a pointer variable and a reference variable in C++?
- In C++ What are the differences between a pointer variable and a reference variable?
- What is the difference between object and reference in java?
- Differences between Method Reference and Constructor Reference in Java?
- Passing by pointer Vs Passing by Reference in C++
- What is the difference between pass by value and reference parameters in C#?
- Why do we pass a Pointer by Reference in C++?
- C program to display relation between pointer to pointer
- Differences between Lambda Expression and Method Reference in Java?