1) 15 points a) (float) num b) long double percentage; c) short int foo; unsigned short int foo; and char foo; are also acceptable d) 10 e) 4 2) 34 points a) 12 5 2 b) 5 9 13 17 21 c) 0 2 1 3 2 5 5 d) 2 3 2 7 2 11 e) 25 16 9 Yes 3) 15 points You can use it to determine whether three numbers are the lengths of the sides of a right triagle. 4) 36 points a) int order(char arr[], int len); int numordered(char arr[][80], int lens[], int rows); b) numordered(words, lengths, 30); c) int order1 (char a[], int len) { int i, result = 1; for (i = 0; i < len - 1; i++) if (a[i] > a[i+1]) result = 0; return result; } int order2 (char a[], int len) { /* while loop version (more efficient) */ int i = 0, ordered = 1; while (ordered && i < len - 1) { if (a[i] > a[i+1]) ordered = 0; i++; } return ordered; } int order3 (char a[], int len) { int i, result = 0, counter = 0; /* counter version */ for (i = 0; i < len - 1; i++) if (a[i] <= a[i+1]) counter++; if (counter == len - 1) result = 1; return result; } int numordered(char arr[][80], int lens[], int rows) { int i, count = 0; for(i = 0; i < rows; i ++) if(order(arr[i], lens[i])) count ++; return count; } OR int numordered2(char arr[][80], int lens[], int rows) { int i, count = 0, j; char tmparray[80]; for(i = 0; i < rows; i ++) { for(j = 0; j < 80; j++) tmparray[j] = arr[i][j]; if(order(tmparray, lens[i])) count ++; return count; }