Skip to content

Latest commit

 

History

History
15 lines (10 loc) · 336 Bytes

send_commands_to_terminal.md

File metadata and controls

15 lines (10 loc) · 336 Bytes

Executing terminal commands in a console application

#include <stdlib.h>

int main(){
    system("echo foo");
    return 0;
}
  • include <stdlib.h> - standard C library that contains system functions
  • system("echo foo") - function receives the argument (echo foo in this case) and executes it on the terminal.