Comp 1672 Winter 2003 Homework 2 Assigned Monday, January 13, 2003 Due Tuesday morning, January 21, 2003 1. a. Convert 2356 to hexadecimal and then to binary b. Convert 0xCF8 to decimal 2. Read pp. 386-389, do problem 9 on page 401 (covers string processing) 3. Do problem 6 on page 346 (reviews pass-by-reference) 4. Do problem 11 on page 348 (default parameters) 5. Do problem 12 on page 348 (default parameters) 6. Find the error(s) in the following code: void process_array(const float a[], const int size) { int i, total(0), new_num; cin >> new_num; a[size++]=new_num; for (i=0; i < size; i++) total += a[i]; for (i=0; i < size; i++) a[i] /= total; } 7. Do problem 4 on page 461 (character arrays) 8. Do problem 5 on page 461 (character arrays) 9. Write your own version of the strcpy function 10.Say I have the following definition: const int students = 3; const int exams = 4; int studentGrades[students][exams] = { {77, 68, 86, 73}, {96, 87, 89, 78}, {70, 90, 86, 81} }; a. Write a few lines of code that will calculate the average score for each student. b. Write a few lines of code that will calculate the average score on each exam.