Pointer (continued)
Dynamic nature of a pointer
#include <stdio.h>
char frststr[11] = "excellence"; /*first string*/
char scndstr[] = "impression"; /*second string*/
int main()
{
char *fptr;
fptr = frststr;
printf("%s", fptr);
fptr = scndstr;
/*now fptr will point to the second string*/
printf("%s", fptr);
/*thus fptr can hold any address*/
/*but frststr = scndstr cannot be done*/
}