C Programming

Run Linux Command

Learn C programming for run Linux Command using C

7/1/2018
0 views
run-linux-command.cC
#include<stdlib.h>

int main() {

	/* System function use to run system commands */
	/* Print date on the terminal */
	system("date");

	/* List directory content on the terminal */
	system("ls");
	return 0;
}




/* Output */
Sat Aug 30 10:09:04 IST 2014
ab.txt
file.txt
program.c
programming.c
C programmingRun Linux CommandSystem Command

Related Examples