#include <stdio.h>
//printing address of array variables
int main()
{
int num[]={24,34,12,44,56,17}; //num[0]=24 num[1]=34 num[2]=12
int i;//for looping
for(i=0;i<=5;i++)
{
printf("\n Element number %d",i); //prints the looping value
printf("\n Address ::%u", &num[i]);
}
return 0;
}
Element number 0
Address ::210553136
Element number 1
Address ::210553140
Element number 2
Address ::210553144
Element number 3
Address ::210553148
Element number 4
Address ::210553152
Element number 5
Address ::210553156
Comments
Post a Comment