Respected Experts ,
I am a newbie to C programming Language .
I am trying to print a string in C Language . The code runs successfully but when i enter the string , it does not displays the string entered by the user in return
I have attached the screenshot of the code which I am trying to execute .
Please help me out .
#include<stdio.h>
int main()
{
char str[20];
char *pt;
printf("Enter any string :\n");
gets(str);
pt=&str[0];
for(*pt=0; *pt != '\0'; *pt++)
{
printf("%c", *pt);
}
}