Execute a system command: Difference between revisions

m
→‎{{header|C}}: stripped unuseful text (because of the task specification)
(→‎{{header|C}}: this C code compiles on every machine having a reasonable C compiler, and system is POSIX compliant)
m (→‎{{header|C}}: stripped unuseful text (because of the task specification))
Line 25:
{{works with|POSIX|.1-2001}}
 
<lang c> #include <stdlib.h>
(The command <tt>ls</tt> may not exist on some system)
 
<lang c>
#include <stdlib.h>
int main()
{
system("ls");
}</lang>
</lang>
 
=={{header|C++}}==