text: c help needed? can anyone tell me how to execute dos commands using c? i tried the following but it isn't working. #include #include int main(void) { printf("going to execute a c command"); system("dir"); return 0; } iam just getting the printf statement executed. the dir command isn't working plz help! i dont code much in windows, but what little i have seen, system command work just as well there. i tried your code in linux (with ls replaceing dir) and i got the expected result. so the program works for sure. tell you what, check if adding a &#92;n at the end of the print line changes things. i have a feeling, you are running into buffer related issues. the other thing that you can do is to change the command from dir to something like "mkdir a"