C Array address confusion -
suppose have following code:
main () { char string[20]; printf(" string %s \n " , &str); }
what printf(" string %s \n " ,&str);
give?
suppose str points location 200, &str
give??
not sure want, according question title, might want know couple of things array addresses:
main () { char string[20]; char *str = &string; printf("the string addr %p \n" , &string); printf("the string addr %p \n" , &string[0]); printf("the string addr %p \n" , str); printf("the string addr %p \n" , &str[0]); }
all these equivalent ways address of "array". address of array address of first element of array.
Comments
Post a Comment