1) {[4 pts.]} Give the sequence of UNIX commands which would be used (1) to create a source file named this.c, (2) compile that source file (assuming you saved it in the previous step), and (3) run the executable file created by that compilation. Use the tools discussed in class to preform each of these tasks, and note that each of the commands is given at the UNIX shell prompt. % _ emacs this.c % _ cc this.c % _ a.out 2) {[3 pts.]} Briefly describe the purpose of each of the UNIX commands given here ls - lists the contents of a directory (list) cd - moves you to another directory (change directory) more - displays the contents of a file one screenful at a time 3) {[3 pts.]} Give an example of one escape sequence that can be used within the string passed to the printf function and tell what it means to the format of the output. \n = newline \t = tab \r = carriage return \a = beep \b = backspace \\ = \ \" = " %% = % 4) {[12 pts.]} What is the output generated for each of the following statements, given the declarations shown? Each subpart is independent and does not rely on the results of those above it. Be sure to leave the correct whitespace (blank lines if appropriate and use ^ to indicate each blank space). int x= 2, y= 5; float z= 2.879; a. printf("%d-%d", x * x, y - x); 4-3 b. printf("\nx\\y\n"); _____ x\y c. printf("%d(%5.1f)\n",x,z); 2(^^2.9) d. printf("%.2f", z - x); 0.88 5) {[18 pts.]} Write a complete C program which will prompt its user to enter the amount of change they have in thier pocket. It will be a series of 4 integers telling the number of quarters (25 cents), dimes (10 cents), nickles (5 cents) and pennies (1 cent). Your program must then tell them the amount of money they have written as $xx.xx (dollar sign, whole dollars, decimal point and fraction of a dollar). Your program must be neatly written, using good style as explained in class and in your text, and contain at least one comment and one symbolic constant definition. For example, here is one sample execution of such a program (input values are underlined). Enter your coins: _5_2_1_3_ You have $1.53. -------------------------------- #include #define qval 25 #define dval 10 #define nval 5 /* answer key to last question on quiz1 */ main() { int qt, nk, dm, pn; float amt; printf("Enter your coins: "); scanf("%d %d %d %d",&qt, &dm, &nk, &pn); amt = (qt*qval+dm*dval+nk*nval+pn)/100.0; printf("You have $%.2f.\n",amt); return 0; }