home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
GLEN
/
CTUTOR1.ZIP
/
POINTER.C
< prev
next >
Wrap
Text File
|
1985-02-05
|
512b
|
11 lines
main() /* illustration of pointer use */
{
int index,*pt1,*pt2;
index = 39; /* any numerical value */
pt1 = &index; /* the address of index */
pt2 = pt1;
printf("The value is %d %d %d\n",index,*pt1,*pt2);
*pt1 = 13; /* this changes the value of index */
printf("The value is %d %d %d\n",index,*pt1,*pt2);
}