
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Dereferencing a Pointer in C/C++
Dereferencing is used to access or manipulate data contained in memory location pointed to by a pointer. *(asterisk) is used with pointer variable when dereferencing the pointer variable, it refers to variable being pointed, so this is called dereferencing of pointers.
int main() { int a = 7, b ; int *p; // Un-initialized Pointer p = &a; // Stores address of a in ptr b = *p; // Put Value at ptr in b }
Here, address in p is basically address of a variable.
Complete tutorial on dereferencing: C++ Dereferencing
Advertisements