Write a c program to implement the array of pointers

   program        
            #include<stdio.h>
#include<conio.h>
void main()
{
int *arr[3];
int i=10,j-20,k=30,m;
int *a,*b.*c;
clrscr();
arr[0]=&i;
arr[1]=&j;
arr[2]=&k;

a=&i;
b=&j;
c=&k;

printf("Address of variables a,b,c\n");
printf("%u\n",a);
printf("%u\n",b);
printf("%u\n",c);
printf("Value presented in array\n");
for(m=0; m<=2; m++)
{
printf("\n%u",arr[m]);
}
printf("\n");
for(m=0; m<=2; m++)
{
printf("\n%u",&arr[m]);
}
printf(\n");
for(m=0; m<=2; m++)
{
printf("\n%d",*(&arr[m]));
}
getch();

}

0 Comment "Write a c program to implement the array of pointers"

Post a Comment

:) :)) ;(( :-) =)) ;( ;-( :d :-d @-) :p :o :>) (o) [-( :-? (p) :-s (m) 8-) :-t :-b b-( :-# =p~ $-) (b) (f) x-) (k) (h) (c) cheer
Click to see the code!
To insert emoticon you must added at least one space before the code.

Loading...
இணைந்திருங்கள் 24 நேரமும்!! Like us on Facebook!)