Question: #include #include int main() { char str[10]; fgets(str, 10, stdin); printf(%s , str); char* word_1 = strtok(str, ); printf(Word 1 is: %s , word_1);

#include
#include

int main()
{
char str[10];


fgets(str, 10, stdin);
printf("%s ", str);

char* word_1 = strtok(str, " ");
printf("Word 1 is: %s ", word_1);

char* word_2 = strtok(NULL, " ");
printf("Word 2 is: %s ", word_2);

return 0;

}
1. Create a child process to execute the command using execlp() or execle() like in the code below. It must pass a fixed list of arguments.
execlp ( progName" , progName" , ARG , (char *) 0);
2. What is the system call to collect resource usage statistics?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!