#include #include #include char *method1(void) { static char a[4]; scanf(\"%s\\n\", a); return a; } i
you can use either of these to avoid the mentioned problem : scanf("%s",a); or scanf("\n%s",a);
scanf("%s",a);
scanf("\n%s",a);