subject

Need help with Linux homework! Please take screenshots if you can. 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 main(), 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 file1.cc

Compiling file12.cc Linking files to create executable hw1

Done

$> run. sh
Running 'hw1' with 0 arguments:

stdout appended to stdout. txt

stderr appended to stderr. txt
Running 'hw1' with 1 argument:

stdout appended to stdout. txt

stderr appended to stderr. txt
Running 'hw1' with 5 arguments:

stdout appended to stdout. txt

stderr appended to stderr. txt

$> more stdout. txt
argc was: 1

./hw1

Done!

argc was: 2

./hw1

abc

Done!

argc was: 6

./hw1

a

b

c

d

e

Done!

$> more stderr. txt
Inside proc1() as stderr

Inside proc1() as stderr

Inside proc1() as stderr

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 16:00
If a client wants to make minor edits, what should he/she use?
Answers: 3
question
Computers and Technology, 24.06.2019 15:30
The idea that, for each pair of devices v and w, there’s a strict dichotomy between being “in range” or “out of range” is a simplified abstraction. more accurately, there’s a power decay function f (·) that specifies, for a pair of devices at distance δ, the signal strength f(δ) that they’ll be able to achieve on their wireless connection. (we’ll assume that f (δ) decreases with increasing δ.) we might want to build this into our notion of back-up sets as follows: among the k devices in the back-up set of v, there should be at least one that can be reached with very high signal strength, at least one other that can be reached with moderately high signal strength, and so forth. more concretely, we have values p1 ≥ p2 ≥ . . ≥ pk, so that if the back-up set for v consists of devices at distances d1≤d2≤≤dk,thenweshouldhavef(dj)≥pj foreachj. give an algorithm that determines whether it is possible to choose a back-up set for each device subject to this more detailed condition, still requiring that no device should appear in the back-up set of more than b other devices. again, the algorithm should output the back-up sets themselves, provided they can be found.\
Answers: 2
question
Computers and Technology, 24.06.2019 17:40
Write an assembly language program to input a string from the user. your program should do these two things: 1. count and display the number of words in the user input string. 2. flip the case of each character from upper to lower or lower to upper. for example if the user types in: "hello there. how are you? " your output should be: the number of words in the input string is: 5 the output string is : hello there. how are you?
Answers: 2
question
Computers and Technology, 24.06.2019 21:00
Which device has the most limited computing functionality?
Answers: 1
You know the right answer?
Need help with Linux homework! Please take screenshots if you can. With console logging enabled, wr...
Questions
question
Biology, 18.06.2021 23:30
question
Mathematics, 18.06.2021 23:30
question
Health, 18.06.2021 23:30
Questions on the website: 13722363