Lost universe of Programing

USERNAME :- Forum Post:-114
 
HomePortalGalleryRegisterLog in

Share | 
 

 Pointers

Go down 
AuthorMessage
Administrator
Admin
Admin
avatar

Male
Number of posts : 160
Age : 32
Location : Lucknow
Job/hobbies : Software Engeener
What U like To do ? : Because Its Rock with me.
Registration date : 2008-01-06

PostSubject: Pointers   1/17/2009, 11:33 pm

Pointers are the variable, which stores the address of the value stored in the memmory. You can say that suppose you are the value and you live in the house, and house have address, which tells to other person where you live. in the same manner value is stored in the variable, like a=10,In the memory at a particular address so now pointer stored the adress of memory where the value 10 is stored.

For example

#include iostream.h
void main()
{
a=10 ;//value 10 is stored in the memory at some address
Count<<&a; // this & 'and'sign is used to get the address of the value 10 where it is stored in the Memory So as a stored the value 10 but &a tells you the address of the memory where value 10 is stored.
getch();
}

Run this Program and you can now the address where the value is been stored.

#include
#include
void main()
{
int a = 2;
int *p;
p = &a;
Cout<<*P<

_________________

""-(`v)-"HACKER OF HEART"-(`v)-"

Back to top Go down
View user profile http://aspx.forumotion.com
 
Pointers
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Lost universe of Programing :: --=| SOURCE CODE |=-- :: C/C++ SOURCE CODE-
Jump to: