1 Follow the instructions below regarding an array called fractions. C type file
a) Define a symbolic constant SIZE with the replacement text 10. b) Define a double array with SIZE elements and initialize the elements to 0. c) Refer to array element 4.d) Assign the value 1.667 to array element nine.e) Assign the value 3.333 to the seventh element of the array.f) Print array elements 6 and 9 with two digits of precision to the right of the decimal point, and show the output that’s displayed on the screen.g) Print all the elements of an array using a for iteration statement. Use the variable x as the loop’s control variable. Show the output.
2 Write statements to accomplish the following:a) Define table to be an integer array and to have 3 rows and 3 columns. Assume the symbolic constant SIZE has been defined to be 3.b) How many elements does the array table contain? Print the total number of elements.c) Use a for iteration statement to initialize each element of table to the sum of its subscripts. Use variables x and y as control variables.d) Print the values of each element of array table. Assume the array was initialized with the definition: int table[SIZE][SIZE] = {{1, 8}, {2, 4, 6}, {5}};
3 Write statements to accomplish each of the following:a) Display the value of the seventh element of character array f.b) Input a value into element 4 of one-dimensional floating-point array b.c) Initialize each of the five elements of one-dimensional integer array g to 8. d) Total the elements of floating-point 100-element array c.e) Copy array a into the first portion of array b. Assume a has 11 elements, b has 34 elements, and both arrays have the same element type.f) Determine and print the smallest and largest values contained in 99-element floating-point array w.
4 Consider a 2-by-5 integer array t.a) Write a definition for t.b) How many rows does t have?c) How many columns does t have?d) How many elements does t have?e) Write the names of all the elements in the second row of t.f) Write the names of all the elements in the third column of t.g) Write a single statement that sets the element of t in row 1 and column 2 to 0.h) Write a series of statements that initialize each element of t to zero. Do not use an iteration statement.i) Write a nested for statement that initializes each element of t to zero. j) Write a statement that inputs the values for the elements of t from the terminal.k) Write a series of statements that determine and print the smallest value in array t.l) Write a statement that displays the elements of the first row of t.m)Write a statement that totals the elements of the fourth column of t.n) Write a series of statements that print the array t in tabular format. List the column subscripts as headings across the top and list the row subscripts at the left of each row.
5 Find the error in each of the following program segments and correct the error:
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more