Run Linux Command

C Programming

C Programming Examples

#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