Back
#include<stdio.h>
int main()
{
int x=1, y=2, z[10]={5};
char name[]={'d','a','n','i','e','l','\0'};
int *ip;
char *cp;
ip=&x;
cp=&name[0];
printf("\t-----Pointers Practice---------\n");
printf("x=%d or x=%d \n",x,*ip);
printf("char=%c or char=%c \n",name[0], *cp);
printf("y before = %d ",y);
y=*ip;
printf(" y after = %d \n",y);
ip=&z[0];
printf("ip = %d\n", *ip);
printf("Get My Name ...");
while(*cp) putchar(*cp++);
printf("\n");
int counter=0;
printf("Let us use arrays....");
while(counter<6) { putchar(*(name+counter)); counter++; }
printf("\n");
return 0;
}
Top |