#include "stdafx.h"
#include "stdlib.h"
int _tmain(int argc, _TCHAR* argv[])
{
char *dumb = (char*)malloc(50);
scanf("%[^\n]s", dumb);
printf("%s\n",dumb);
scanf("%[^\n]s", dumb);
printf("%s\n", dumb);
return 0;
}
I need help with the code, if I run this code and write in the first scanf "Hellow World" it prints out 2 "Hello Worlds" and jumps over the other scanf , and well how do I fix it??