because you are using a while loop and you have set the condition to "while(1)," it will always be true, therefore, it is unneccassary to manuelly reset it. after it prints the char "lol," it will automaticly start the while again. remember, while is a loop for a reason.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char lol[20];
while(1)
{
printf("command: ");
scanf("%s", lol);
printf("&s\n", lol);
}
}
theoreticly this should work, correct me if im wrong.
EDIT: Sorry, didnt realize what u meant at first. this doesnt really fix your problem. im on a mac, although i believe if
your on windows you can do...
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char lol[20];
while(1)
{
printf("command: ");
scanf("%s", lol);
printf("&s\n", lol);
system("PAUSE");
}
}
although that may be wrong. macs pwn over windows. lol.