The C function used to run the command is
for eg:
system("ls");
execute ls command whereas
system("pwd");
execute pwd command.
A sample C program
It produces the output as
'pwd' is a unix command for showing the present working directory.
system();
for eg:
system("ls");
execute ls command whereas
system("pwd");
execute pwd command.
A sample C program
#include<stdio.h>
#include<stdlib.h>
main()
{
char c[10]="pwd";
system(c);
}
It produces the output as
'pwd' is a unix command for showing the present working directory.
No comments :
Post a Comment