Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Databases Technologies And Applications

Authors: Zongmin Ma

1st Edition

1599041219, 978-1599041216

More Books

Students also viewed these Databases questions

Question

22. How do opiates influence dopamine synapses?

Answered: 1 week ago

Question

Complexity of linear search is O ( n ) . Your answer: True False

Answered: 1 week ago