Write a program that dynamically allocates an array large enough to hold a user-defined number of test
scores. Once all the scores are entered, the array should be passed to a function that sorts them in
ascending order. Another function should be called that calculates the average score. The program
should display the sorted list of scores and averages with appropriate headings. Use pointer notation
rather than array notation whenever possible.
Input Validation: Do not accept negative numbers for test scores.
Example
Enter the number of test scores: 4
Enter each test score:
Test#1: 34
Test #2: 73
Test #3: 22
Test #4: 89
Sorted test scores:
Test #1: 22
Test #2: 34
Test #3: 73
Test #4: 89
Average = 54.5
how many formula units of iron (III) oxide can be produced from the reaction of 108 g of iron with 72.1 L of oxygen gas at STP?
how many formula units of iron (III) oxide can be produced from the reaction of 108 g of iron with 72.1 L of oxygen gas at STP?
A 1D binary character array is given to you in file “task1.txt”. You are required to find out maximum
consecutive ones in the array.
Note: Read the file and find the exact length of data in a separate function. Use that size to create a
dynamic integer array using pointers. Then, read the file again and insert data into this dynamic array of
exact calculated size. Then You are required to find out maximum consecutive ones in the array.
task1.txt
11010101111110110111010
Expected output:
- maximum consecutive ones are: 111111
- Starting index is: 7
- Length is: 6
Is this statement true or false ? provide reason for your answer
d/dx[ x2∫(π/2) e2cost dt ] = -2xe2(cosx^2)
A 1.0 kg object is brought to planet Mercury where the acceleration due to gravity is 0.38 times its value on Earth. (a) What is the weight of the object on Earth? (b) What is the mass of the object on Mercury? What is its weight on Mercury?
For each redox reaction below, determine the oxidation number of each element present. Write your answer above each symbol for the element.
a. 2Sb(s) + 3I2(g) —> 2SbI3(s)
b. 2Cu2S(s) + 3O2(g) —> 2Cu2O(s) + 2SO2(g)
c. PbO2(s) + Pb(s) + 2H2SO4(aq) —> 2PbSO4(aq) + 2H2O(l)
d. NH4NO3(s) —> 2H2O(g) + N2O(g)
e. Fe2O3(s) + 3CO(g) —> 2Fe(s) + 3CO2(g)
Calculate the standard cell potential for
Zn(s) + Ag*(aa) → Zn²+ + Ag(s)
Assume that all the concentrations are 1.0 M. Standard reduction potentials are given in table 1.
Write half-reactions for each of the following redox reactions. Identify each half-reaction as being either oxidation or reduction. Show your work.
A. SnS2(s) + O2(g) —> SnO2(s) + SO2(g)
B. Mg(s) + N2(g) —> Mg3N2(s)
Balance the following equations, using the oxidization number method for the redox part of the equation. Show your work.
A. Cu2O(s) + H2(g) —> Cu(s) + H2O(l)
B. Cl2(g) + KBr(aq) —> Br2(l) + KCl(aq)