Using Putty, please explain how you would go about doing this. If possible the c
ID: 3878969 • Letter: U
Question
Using Putty, please explain how you would go about doing this. If possible the commands you would use in Putty through using Emacs, and also the C++ Code you use.
With console logging enabled, write a program that consists of two C+source files. The first file contains the mainO routine and the second file contains a C++procedure From within mainO, 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 stdoutExplanation / Answer
GCC C/C++ Compiler
Step
Type cd into the PuTTY terminal, followed by the directory address that holds the C or C++ source code you wish to compile.
Step
Type ls if you are using PuTTY to log into a Unix-based machine, or dir if you are using PuTTY to log into a Windows machine. This lists the files in the current directory. Ensure the source code file you wish to compile is present.
Step
Type gcc -o MyExecutable MySourceCode where "MyExecutable" is the name you want your compiled executable to bear and "MySourceCode" is the name of the source code you want to compile. It will have the C or CPP file extension, depending on whether it's a C language source file or a C++ language source file.
**Please provide the cf score by liking the answer.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.