programming-examples/c/_Basic/Get Address of an array using Arrays and Pointers.c

14 lines
329 B
C
Raw Normal View History

2019-11-15 12:59:38 +01:00
#include <stdio.h>
int main(void)
{
char multiple[] = "My string";
char *p = &multiple[0];
printf("\nThe address of the first array element : %p", p);
p = multiple;
printf("\nThe address obtained from the array name: %p\n", p);
return 0;
}