This is not what i meanQuote:
scanf("%s %s %s", str1, str2, str3);
An easy way is to use a different delimiter, say ;
scanf("%[^;];%[^;];%[^;];", str1, str2, str3);
see my uploaded image below
Attachment 12440
it is from source CODE here,
Code:#include<stdio.h>
#include<stdlib.h>
#define STR_MAX 100
main()
{char x[STR_MAX];
printf("Your name =");scanf("%s",x);
printf("Your name is =%4s\n",x);system("pause");return EXIT_SUCCESS;}