Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

With console logging enabled, write a program that consists of two C++source files. The first file contains the main) routine and the second file contains

image text in transcribedimage text in transcribedimage text in transcribed

With console logging enabled, write a program that consists of two C++source files. The first file contains the main) routine and the second file contains a C++ procedure From within main0, you must display the count of command line arguments to stdout. Further, you must display the value of each command line argument to stdout. Finally, you must call the procedure that is defined in the second file. From within the procedure defined in the second file, you must display a log message that states you are inside the procedure. This log message must be sent to stderr. You are then to create a shell script for compiling your code. The script will individually compile each file and generate the intermediate object file. Once the object files are created, the script will call the linker and link the object files into an executable. Your shell script should echo what it is doing at each step to stdout. You are then to create a second shell script that will run your program several times with varying command line arguments. Each time you call your program, you should append the stdout to an output file called stdout.log and you should append the stderr to an output file called stderr.log. Your shell script should echo what it is doing at each step to stdout. Example Output > compile.sh Setting TEMPDIR environment variable to /scratch Compiling filel.cc Compiling file12.cc Linking files to create executable hwl Done Running 'hwl' with 0 arguments: stdout appended to stdout.txt stderr appended to stderr.txt stdout appended to stdout.txt stderr appended to stderr.txt Running 'hwl' with 5 arguments: stdout appended to stdout.txt stderr appended to stderr.txt $> more stdout.txt argc was: 1 ./hwl Done! argc was: 2 ./hwl Done! argc was: 6 ./hwl Done! > more stderr.txt Inside procl ) as stderr Inside procl ) as stderr Inside procl ) as stderr

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

Step: 3

blur-text-image

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

Databases DeMYSTiFieD

Authors: Andy Oppel

2nd Edition

0071747990, 978-0071747998

More Books

Students also viewed these Databases questions

Question

Define induction and what are its objectives ?

Answered: 1 week ago

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

I didnt know who to talk to.

Answered: 1 week ago

Question

Th e complaint department was closed over the lunch hour.

Answered: 1 week ago

Question

Th ey probably would have treated me like a criminal.

Answered: 1 week ago