Here is a program, I write it to output all the characters of a string one by one. But I also print the address of individual blocks of the array. The problem is addresses for all blocks are same. Why? Does someone know?
#include<stdio.h>
int main()
{
char enter[]="Kinsman";
char *ptr;
ptr=enter;
int i=0;
while(*ptr!='\0')
{
printf("%c%p\n",*ptr,&ptr);
ptr++;
for(i=0;i<=100000000;i++);
}
return 0;
}