Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do you do the highlighted part in terminal for macbook? Can you please screenshot the process? EK125 HW2--bash-80x24 dhcp-wifi-8021x-168-122-215-102: EK125 HW2 apapadak$ ls converter.c
How do you do the highlighted part in terminal for macbook? Can you please screenshot the process?
EK125 HW2--bash-80x24 dhcp-wifi-8021x-168-122-215-102: EK125 HW2 apapadak$ ls converter.c dhcp-wifi-8021x-168-122-215-102: EK125 HW2 apapadak$ gcc -o hello hello.c dhcp-wifi-8021x-168-122-215-102: EK125 HW2 apapadak$ ls converter.c dhcp-wifi-8021x-168-122-215-102:EK125 HW2 apapadak$ ./hello Hello world! Welcome to EK125, time to learn C! dhcp-wifi-8021x-168-122-215-102:EK125 HW2 apapadak$ hello. c image.c hello hello.c image. c It is also possible to pass arguments to the code from the command line. If you were working with your default a.out, and you wanted to pass a number, you could type .la.out 5 so that your .c file can do something with the user input of 5 - which will be determined by the program itself. Whatever you type after ./a.out are called command line arguments. Such an example is the image.c file, which expects a word as a command line argument. Try it out, e.g with .la.out hello What you will have to do for this part of the homework is to compile the three .c files that are given to you: hello.c, image.c, converter.c and compile these three .c files with executable filenames with the same name as the original filenames themselves. For example, compile the hello.c file to the executable named hello. Then, you are to see how they are actually run by executing the file. You already know that hello.c just prints two sentences and that image.c just takes one argument which is a string. The other program, converter.c, requires an integer as a command line argument. Save the three executable files in the same folder that contain the three .c files, as well as with screenshots of you renaming the outputs and running them, showing that you clearly understand how they work. You are to keep all these in one folder named with the format: LastNameFirstName EK125HW2Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started