Problem with scanf():
-we can not take the input in scanf() with space.
program-
#include< stdio.h>
int main()
{
char s[40];
printf("Enter any String with Space\n");
scanf("%s",&s);
printf("Your string is %s",s);
}
Enter any String with Space
This is r4r website
Your string is This
#include< stdio.h>
int main()
{
char s[40];
printf("Enter any String with Spacen");
gets(s);
printf("Your string is %s",s);
}
Enter any String with Space
This is r4r website
Your string is This is r4r website