107. Understanding pointers.
#include<stdio.h>
void
main()
{
int a=10,b=20;
int *p;
p=&a;
printf("%d %d\n",a,*p);
*p=100;
printf("%d %d\n",a,*p);
p=&b;
printf("%d %d\n",b,*p);
*p=200;
printf("%d %d\n",b,*p);
}
Comments
Post a Comment