Arrays and data files in C language Write a declaration stat
Arrays and data files in C language
Write a declaration statement for a 1-D array called time data with a length of n, where n is a pre-declared integer variable. (In other words, n has already been declared in advance.) (Remember, you cannot initialize variable-length arrays in a declaration statement) Write a declaration statement for a 2-D array called wave data with a width of 2 and a length of 10. Write the same declaration, but for a 2-D array with a width of 2 and a length of n. Write the declaration statement for a file pointer to represent wave data, and then write a file assignment statement for that pointer that opens a file, defined as a symbolic constant FILENAME, as a read file. Write a for loop that will run a total of n times, and in each iteration will read three floating point values from the pointer declared in the last question, storing the first in the array time data and the other two in the columns of the array wave data. (Remember that arrays in ego from subscript (0) to (n-1). Write a for loop that will run a total of n times. Use this loop to add up the values of each column of wave data, and then find the average of each column. Write a statement that calculates the percent error between variables containing amplitude data for two separate waves. Percent Difference = |A - B/(A + B/2)|* 100%Solution
1)))))))))
int timed[100];
2)))))))))))
// declaration ofr 2d array
int wavedata[2][10];
3))))))))))))
int n=10;
int wavedata[2][n];
4)))))))))))
