Pointers In C
What are Pointers in C
It is a variable which is used to store the address of another variable in other words you can ay it points to the address of the variable. pointers improve the performance of the program also helps to reduce the code and can accessed to any memory location , Pointers can be used with array, functions and structures .
int a=70 ;
int *p; // pinter declaration;
p=&amp;a;//store the address of a
printf("%x",p);// address of pointer
Pointers concept and description
|Sr.No.||Concept & Description|
There are four arithmetic operators that can be used in pointers: ++, –, +, –
Array of pointers
You can define arrays to hold a number of pointers.
Pointer to pointer
C allows you to have pointer on a pointer and so on.
Passing pointers to functions in C
Passing an argument by reference or by address enable the passed argument to be changed in the calling function by the called function.
Return pointer from functions in C
C allows a function to return a pointer to the local variable, static variable, and dynamically allocated memory as well.