Sun Jul 01 2018

Run Linux Command

C Programming2884 views

File Name: run-linux-command.c

#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

We use cookies to improve your experience on our site and to show you personalised advertising. Please read our cookie policy and privacy policy.