Code:#include <stdio.h> #define MAXSTRLEN 255 main () { /*main*/ char *CurCharPtr; char String [MAXSTRLEN]; printf("Enter a line of text:"); /*write a prompt*/ fgets(String,MAXSTRLEN,stdin); /*read the line*/ /*Print a character until found *a zero terminator is found */ for (CurCharPtr= &string[0]; *CurCharPtr!='\0'; CurCharPtr++) printf("The next character is %c\n", *CurCharPtr); } /*main*/
How do i rewrite the above program by simplifying it using array and pointer references?