Pointer Basics

28/07/2009 ·

A pointer references a value stored elsewhere in memory, and obtaining or requesting the value to which a pointer refers is called dereferencing the pointer. The pointer variable doesnt store the value of the variable itself but it points to the memory address where the value is stored.
Eg. if we say a is a pointer to b then, a stores the address where the b is located i.e. 1462. It means value of a (1462) is the address of b. So the address of b is 1462 and the value stored at address 1462 is 17. So the value of b or *a is 17.

3 comments:

loneranger said...
04/11/2009, 03:31  

awsome work.keep it going

Anonymous said...
26/11/2009, 02:52  

I'm just beginning to look at C language in the hopes of developing apps. I did very limited programming years ago using FORTRAN and RPG so I am basically new to all this. I had heard that people have a lot of trouble w/the pointers concept. I looked it up here at your site and you explained it so well that I can't see why anyone would have a problem with the concept.

Thanks for your site. Do you have a language glossary available?

Anonymous said...
24/07/2013, 12:09  

Great explanation. I could not thank you enough. I never understood the concepts of pointers in my B.Tech. to the extent this blog was able to explain in just a minutes. Thanks a ton. Please post more often.

Post a Comment

Submit Request

If you need some code or programs just post a comment on this post. I will try to provide you the same at the earliest.

About this blog

Free sample code, example code , code snippet , tutorials in C C++. Find, download and reuse the code database available which vary from small programs to large ones as well. Feel free to request for code that is not in the list.

Followers