• Home
  • Tutorials
  • Interviews
  • Info Seed
  • Forums
  • Projects
  • Links
  • Contact Us
C Language
C POINTERS
INTRODUCTION
What are POINTERS?
Illustration of POINTER assignments
Illustration - II
Illustration - III
POINTER arithmetic- POINTER + number
POINTER - number
POINTER - POINTER
NULL POINTER
Common Errors
DEREFERENCING NULL
DANGLING POINTER
REFERENCING DE-ALLOCATED MEMORY
MEMORY MANAGEMENT

 

 

Illustration of pointer assignments

Int* x;

int* y;

int i;

int j;

Memory map at this moment is as:

www.exploreroots.com

x=&i; // the statement assigns the pointee i to pointer x or we can say address of i is stored in variable x.

www.exploreroots.com

*x=2; // the pointee of x gets the value 2. This statement is equivalent to i=2;

Memory map at this moment is as:

www.exploreroots.com

 

 


previous next
| Copyright © 2009 exploreroots- All Rights Reserved | Disclaimer |