1. (15 points) Write a Unix command to accomplish each of the following:
2. (10 points) Write a complete C++ program that prompts the user to enter three numbers of type float, reads the numbers, and displays the value of the smallest.
3. (15 points) Write C++ code that creates a variable named stuff which can hold an integer, a long, a pointer to an integer, and a pointer to a long. Write a statement that prints the value of the long. Assume an integer is four bytes and all the other data types are eight bytes long. Ignoring any extra bytes the compiler might insert to align data items on address boundaries, how big is stuff?
4. (15 points). Write C++ statements to declare a pointer to char named ptrToChar and a char array named charArray that is just large enough to hold the string "this string". Write an assignment statement that puts the address of the first byte of charArray into ptrToChar. How big are ptrToChar and charArray, in bytes?
5. (15 points) Write a template function that takes three arguments, all of the same data type, and which returns their average as a double.
6. (10 points) Explain how C++ can let you write two different functions with the same names. How can the compiler tell which function you want to call when it finds a function reference in your code?
7. (20 points) Write a complete C++ program that allows a user to enter words into an array of character strings. The program prompts for an array position, reads the position, exits if the position is negative, issues an error message if the position is greater than the size of the array, prompts the user for a word, reads the word, displays the word at the array position if the word is "show," and copies the word into the array at the proper position otherwise. The program runs until the user enters a negative position number. Assume the user makes no typing mistakes.