Pointers in C Language - Use of Pointers in C, How to create a pointer in C, C++


Pointers in C Language - Use of Pointers in C, How to create a pointer in C, C++

Pointers are nothing but a special variable which are hold the address of another variable or another pointer variable.
same like as a simple variable, a simple variable hold the value but a pointer hold the address.

Creating Pointer variables in C:- To create a pointer variable in C you should use the * sign before variable name.
Example

int *p1;
float * p2;
char *p3;


Initialize pointer variables in C:-

int *p1;
int x;
p1=&x;

Printing the value of a Pointer in C:-

int *p1,x=10;
p1=x;
printf("%d",*p1);

{ 0 comments... read them below or add one }

Post a Comment