Execute a system command: Difference between revisions

Content added Content deleted
(→‎{{header|C}}: this C code compiles on every machine having a reasonable C compiler, and system is POSIX compliant)
Line 23: Line 23:


=={{header|C}}==
=={{header|C}}==
{{works with|gcc|4.0.1}}
{{works with|POSIX|.1-2001}}

'''Platform:''' [[BSD]]
(The command <tt>ls</tt> may not exist on some system)

<lang c>
#include <stdlib.h>
#include <stdlib.h>
Line 31: Line 34:
system("ls");
system("ls");
}
}
</lang>


=={{header|C++}}==
=={{header|C++}}==