Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please help me with this two questions i have no idea how to solve them thanks (in C programming language and Unix) PostlabO4 9-write a

image text in transcribed

please help me with this two questions

i have no idea how to solve them

thanks (in C programming language and Unix)

PostlabO4 9-write a C program "lab04." with the header file "lab04e.h" that takes two strings from present your first and last names. The program prints the values of the command line that re environment variable COURSE using "getenv". Also, the program concatenate the first and last names and print them like "My Name is: xxxx xxxx". Finally, terminate the program with exit status 20" a. Include the source files changed in the report. b. Compile and link the source file to get the executable file "lab04e". Show the commands you have used and their results in your report From the terminal, add a new environment variable "COURSE-CS222", run the executable file and show the output in the report. c. 10- Write a C program "lab04f.c" with the header file "lab04f.h" which asks the user to input four strings for his first and last names, program name and course number. Then, it sets a new environment variable called COURSE with the input value from the user using "setenv" Also, it creates a child process that executes the program (already read from the user) and send the two input name strings as command line arguments and the environment variable. Meanwhile, the parent process should reap the child process and print the child exit status if child had been normally terminated. Make sure you handle all the possible errors properly with clear error messages and proper wrappers. a. Include the source files changed in the report. b. Compile and link the source file to get the executable file "lab04e". Show the commands you have used and their results in your report. Run the executable file where input program does not exist. Show the output in the report. Run the executable file where input program is "lab03. Show the output in the report. c. d

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2010 Barcelona Spain September 2010 Proceedings Part 1 Lnai 6321

Authors: Jose L. Balcazar ,Francesco Bonchi ,Aristides Gionis ,Michele Sebag

2010th Edition

364215879X, 978-3642158797

More Books

Students also viewed these Databases questions