Strings are character arrays terminated by null character. Pointer to a single string may be declared in the same way as the pointer to a one-dimensional array.
char Name[] = “Dinesh”;
char *ptrname ;
ptrname = Name;
Though the declaration and initialization of a pointer to a string is similar to that of a pointer to an array, the difference lies in the input/output. String may be taken as a single object for input and output and its characters may also be treated like elements of an array.
Illustrates pointer to strings
#include<stdio.h> int main() { char Name[] = "Dinesh"; char* ptrname = Name; clrscr(); printf("Name = %s\n",Name); printf("Name via ptrname = %s\n", ptrname); return 0; }