Documente Academic
Documente Profesional
Documente Cultură
Lecture 15
k a &a[k] a[k]
0 2147462916 2147462916 1000.000000
1 2147462916 2147462920 2000.000000
2 2147462916 2147462924 3000.000000
3 2147462916 2147462928 4000.000000
/*Program Output */
17
Michael J. Miller
The Ohio State University
Winter Quarter Gateway Engineering Education Coalition Lect 15
Engineering H192 - Computer Programming
b is a pointer to b[0][0]
b[0] is also a pointer to b[0][0]
b[1] is a pointer to b[1][0]
b[2] is a pointer to b[2][0]
*b is a pointer to b[0] (special case)
*b[1] is the value of b[1][0] (which is 7)
*b[2] + 1 is the value of b[2][0] + 1 (which is 14)
Assignment G13
Assignment G13
You will note that at the beginning of the file there are
several lines of "header" information followed by
many lines of data in four columns.
For opening the data file and the output file, just
use the usual fopen routine.
"
Date,Time,Ch1:Deg F,Ch2:
11/20/1998 10:38:47.000 -4.989 0.238
11/20/1998 10:38:47.005 -4.989 0.231
11/20/1998 10:38:47.010 -4.989 0.228
11/20/1998 10:38:47.015 -4.989 0.231
11/20/1998 10:38:47.020 -4.989 0.228
Assignment G13
Find the largest value in the array and the smallest
value in the array.
Display the results on the screen, and also write the
results to the output file, g13result.dat. The results to
be displayed and printed are:
The total number of data points in the file
The maximum voltage and time at which it occurred
The minimum voltage and time at which it occurred
The elapsed time between the maximum and
minimum values
Assignment G13
The change in the output voltage is related to the
strain of the strain gage by:
where:
Vout = V in * A * Sg*
Assignment 13