Question: C language not c++ Declare an array 10 Elements and initialize the first 5 elements to the following: Helium He 4 2 Lithium Li 7

C language not c++C language not c++ Declare an array 10 Elements and initialize the

Declare an array 10 Elements and initialize the first 5 elements to the following: Helium He 4 2 Lithium Li 7 3 Oxygen O 16 8 Chlorine Cl 35 17 Calcium Ca 40 20 Write a function findByMass that takes an input an Element array, the number of elements in the array, and a mass and returns a pointer to the element of the array with the given mass. If no such element is found, the function should return NULL. Declare and define your function in elementOps.h and elementOps.c. Ask the user to enter an atomic mass use findByMass to find the element with the given mass then print it if it is not null. If null, print a message that the element was not found. Write a similar function findBySymbol that looks for an element by its given symbol. Read the symbol from standard input first. Print the element found if it is not null. If null, print a message that the element was not found

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!