BEAUTY of the “pointer ” in the programming language?

Mohan Rawat
1 min readJul 10, 2019

--

Pointers are very easy to learn and understand in c programming when you show the interest to learn and access them. Try learning their syntax and advantages first.

The beauty in pointers is the more you use them, the more you can understand their working. The easy way to get a clear understanding on POINTERS is to write your simple programs like ADDITION OF TWO NUMBERS, SWAPPING TO NUMBERS,…… any easy code which you have written using the normal code, TRY them using pointers. This really helps you to get the basic knowledge about how pointers are working and then, later on, you can slowly use pointers in complex programs.

Here are some tips regarding pointers in C which may help you

int *p1, *p2; /*say two different pointers*/

int a,b; /*say two different variables*/

p1=&a;

p2=&b;

/*the above two pointers are pointing to the address of a,b respectively*/

printf(“%d”,*p1); /*gives you the value of a*/

printf(“%d”,p1);/*gives you the address of a*/

the above logic makes you clear about pointers usage initially. yet pointers are very important in C and upon practicing more and more you will understand the real power of pointers.

--

--

Mohan Rawat
Mohan Rawat

Written by Mohan Rawat

tech devotee, nerd developer , writer

No responses yet