iPad 2:29 PM instructure-uploadss3.amazonaws.com 53% 3 C 101 (30pts) 1. What is
ID: 3875678 • Letter: I
Question
iPad 2:29 PM instructure-uploadss3.amazonaws.com 53% 3 C 101 (30pts) 1. What is the exit status and by whom is it produced? Who receives it? What is its purpose? (6pts) 2. Assuming a C file ocean.c, what are the commands to: (6pts) o compile it into an executable file named eleven, while enabling all the warnings and treating them as errors? orun the resulting executable file? 3. What are the three phases that compose all the programming assignments for HW1? (6pts) 4. Assuming that variable k is of type int: (6pts) o what does k contain after the assignment statement k 3.14159? o What does k contain after the assignment statement k-2.71828? 5. Stylistically, which of the following identifiers would be better choices for names of constant macros? Justify briefly) (6pts) gravity MAX SPEED Sphere SizeExplanation / Answer
1. The exit status of a process in computer programming is a number that is passed from a child process or a callee process to a parent process or caller process when it has finished executing a specific procedure. A parent process can create several child processes that rum concurrently. The exit status is used by thr child procrss to nitify the parent process whether it has completed successfully or not so that appropriate action can be taken by the parent process.
2. gcc -Wall ocean.c -o eleven
the -Wall options prints all the warning as errors
to run the executable eleven use the following command
./eleven
4 As k is an int, the fractional portion is ignored ireespective of its value while doing an assignment.So k will . be 3 and 2 in the respective cases as mentioned in the question
5.macro constants should be written in all capital letters as it is a constant and their name should be meaningful. So teh most appropriate identifier would be MAX_SPEED
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.