While Trying this code on eclipse CDT with GCC 5.1.0 Compiler All the strings were printed after the user input .. and while compiling it on Visual Studio and Code Blocks IDEs even with the windows CMD The program worked just fine as expected ..
#include <stdio.h>
static char string[128] = "";
int main() {
printf("Type a string: ");
scanf("%s",string);
printf("The String is %s", string);
return 0;
}
Eclipse Output:
Visual Studio Output:
Thanks ,,,