/* test the system() function */ #include main() { char buf[256]; int res; for ( ; ; ) { printf("> "); fgets(buf, 256, stdin); if (strlen(buf) == 0) exit(0); res = system(buf); printf("\n->%d\n", res); } }