|
-
February 14th, 2004, 12:36 AM
#1
int and float pointer variables
Hello guys, i need some help, how many bytes an int, float pointer variable in ram, a am using win2000,xp on intel machine.
i make program that display
code:
--------------------------------------------------------------------------------
int i=4;
int *p;
p=&i;
clrscr();
cout<<p<<endl; //0x8f1fff4
p++;
cout<<p<<endl; //0x8f1fff6
float p1=1.1;
float *p2;
p2=&p1;
cout<<p2<<endl; //0x8f1fff0
p2++;
cout<<p2; //0x8f1fff4
--------------------------------------------------------------------------------
how many bytes these int and float pointers take in ram, according to this it is showing
int * takes 2 bytes
float * takes 4 bytes.
thanks for clearing my concept.
PUNJABIAN263
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|