Thu Nov 13, 2008 2:53 pm
#include <stdio.h>
void main()
{
int Array[3];
Array[0] = 10;
Array[1] = 20;
Array[2] = 30;
int *pArray;
pArray = &Array[0];
printf("p The value pointed : %d\n", *pArray);
}
#include <stdio.h>
main()
{
int fred[] = { 10, 20, 30, 40, 50, 60, 70 };
int *joe = fred + 5;
int *alex = joe - 3;
fred[0] = 99;
joe[0] = 199;
alex[1] = 299;
int m;
for(m = 0; m < 7; m++) printf("%4d", m);
printf("\n");
for(m = 0; m < 7; m++) printf("%4d", fred[m]);
printf("\n");
}
#include <stdio.h>
void main()
{
int Array[3];
Array[0] = 10;
Array[1] = 20;
Array[2] = 30;
int *pArray;
pArray = &Array[0];
printf("p Value at this %d\n", *pArray);
pArray++;
printf("p Value at this%d\n", *pArray);
pArray++;
printf("p Value at this %d\n", *pArray);
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.