C program to print a string using pointer.

Gapfill exercise

  

#include <stdio.h>
int main()
{
char str[];


printf("Enter a string: ");
gets(str);



printf("Entered string is: ");
while(*ptr!='\0')
printf("%c",*ptr++);

return 0;
}