Question 1
The following shows the output value, for each flag using the input value of
65 (where I have called my executable program args).
args -o 65
octal value is 101
args -x 65
hexadecimal value is 41
args -c 65
character value is A
args -i 65
Integer value is 65
args 65
Integer value is 65
Question 2
The following shows the output of the program, assuming an input array with 10 elememnts.
Enter value 0 of array1 3 Enter value 1 of array1 6 Enter value 2 of array1 8 Enter value 3 of array1 7 Enter value 4 of array1 2 Enter value 5 of array1 9 Enter value 6 of array1 6 Enter value 7 of array1 2 Enter value 8 of array1 6 Enter value 9 of array1 8 The max value stored in the array is 9.000000 It is stored in element of array with index 5
Back to Main Page for Lecture 7 |