Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using C programming Define a structure type element_t to represent one element from the periodic table of elements. Components should include the atomic number (an

Using C programming

Define a structure type element_t to represent one element from the periodic table of elements. Components should include the atomic number (an integer); chemical symbol, the name, and class (strings). Write separate subroutines (functions) using C program to (1) Read the periodic table from file and store them in structure array (2) find out the elements in each class (3) print out the name of the distinct classes and the elements in each them in another file.

Uses the following as the input text file:

atomic number symbol atomic mass name class 1 H 1.00794 Hydrogen nonmetal 2 He 4.002602 Helium noblegas 3 Li 6.941 Lithium alkalimetal 4 Be 9.012182 Beryllium alkalineearthmetal 5 B 10.811 Boron metalloid 6 C 12.0107 Carbon nonmetal 7 N 14.0067 Nitrogen nonmetal 8 O 15.9994 Oxygen nonmetal 9 F 18.9984032 Fluorine halogen 10 Ne 20.1797 Neon noblegas 11 Na 22.98976928 Sodium alkalimetal 12 Mg 24.305 Magnesium alkalineearthmetal 13 Al 26.9815386 Aluminum metal 14 Si 28.0855 Silicon metalloid 15 P 30.973762 Phosphorus nonmetal 16 S 32.065 Sulfur nonmetal 17 Cl 35.453 Chlorine halogen 18 Ar 39.948 Argon noblegas 19 K 39.0983 Potassium alkalimetal 20 Ca 40.078 Calcium alkalineearthmetal 21 Sc 44.955912 Scandium transitionmetal 22 Ti 47.867 Titanium transitionmetal 23 V 50.9415 Vanadium transitionmetal 24 Cr 51.9961 Chromium transitionmetal 25 Mn 54.938045 Manganese transitionmetal 26 Fe 55.845 Iron transitionmetal 27 Co 58.933195 Cobalt transitionmetal 28 Ni 58.6934 Nickel transitionmetal 29 Cu 63.546 Copper transitionmetal 30 Zn 65.38 Zinc transitionmetal 31 Ga 69.723 Gallium metal 32 Ge 72.64 Germanium metalloid 33 As 74.9216 Arsenic metalloid 34 Se 78.96 Selenium nonmetal 35 Br 79.904 Bromine halogen 36 Kr 83.798 Krypton noblegas 37 Rb 85.4678 Rubidium alkalimetal 38 Sr 87.62 Strontium alkalineearthmetal 39 Y 88.90585 Yttrium transitionmetal 40 Zr 91.224 Zirconium transitionmetal 41 Nb 92.90638 Niobium transitionmetal 42 Mo 95.96 Molybdenum transitionmetal 43 Tc 98 Technetium transitionmetal 44 Ru 101.07 Ruthenium transitionmetal 45 Rh 102.9055 Rhodium transitionmetal 46 Pd 106.42 Palladium transitionmetal 47 Ag 107.8682 Silver transitionmetal 48 Cd 112.411 Cadmium transitionmetal 49 In 114.818 Indium metal 50 Sn 118.71 Tin metal 51 Sb 121.76 Antimony metalloid 52 Te 127.6 Tellurium metalloid 53 I 126.90447 Iodine halogen 54 Xe 131.293 Xenon noblegas 55 Cs 132.9054519 Cesium alkalimetal 56 Ba 137.327 Barium alkalineearthmetal 57 La 138.90547 Lanthanum lanthanoid 58 Ce 140.116 Cerium lanthanoid 59 Pr 140.90765 Praseodymium lanthanoid 60 Nd 144.242 Neodymium lanthanoid 61 Pm 145 Promethium lanthanoid 62 Sm 150.36 Samarium lanthanoid 63 Eu 151.964 Europium lanthanoid 64 Gd 157.25 Gadolinium lanthanoid 65 Tb 158.92535 Terbium lanthanoid 66 Dy 162.5 Dysprosium lanthanoid 67 Ho 164.93032 Holmium lanthanoid 68 Er 167.259 Erbium lanthanoid 69 Tm 168.93421 Thulium lanthanoid 70 Yb 173.054 Ytterbium lanthanoid 71 Lu 174.9668 Lutetium transitionmetal 72 Hf 178.49 Hafnium transitionmetal 73 Ta 180.94788 Tantalum transitionmetal 74 W 183.84 Tungsten transitionmetal 75 Re 186.207 Rhenium transitionmetal 76 Os 190.23 Osmium transitionmetal 77 Ir 192.217 Iridium transitionmetal 78 Pt 195.084 Platinum transitionmetal 79 Au 196.966569 Gold transitionmetal 80 Hg 200.59 Mercury transitionmetal 81 Tl 204.3833 Thallium metal 82 Pb 207.2 Lead metal 83 Bi 208.9804 Bismuth metal 84 Po 209 Polonium metalloid 85 At 210 Astatine halogen 86 Rn 222 Radon noble gas 87 Fr 223 Francium alkalimetal 88 Ra 226 Radium alkalineearthmetal 89 Ac 227 Actinium actinoid 90 Th 232.03806 Thorium actinoid 91 Pa 231.03588 Protactinium actinoid 92 U 238.02891 Uranium actinoid 93 Np 237 Neptunium actinoid 94 Pu 244 Plutonium actinoid 95 Am 243 Americium actinoid 96 Cm 247 Curium actinoid 97 Bk 247 Berkelium actinoid 98 Cf 251 Californium actinoid 99 Es 252 Einsteinium actinoid 100 Fm 257 Fermium actinoid 101 Md 258 Mendelevium actinoid 102 No 259 Nobelium actinoid 103 Lr 262 Lawrencium transitionmetal 104 Rf 267 Rutherfordium transitionmetal 105 Db 268 Dubnium transitionmetal 106 Sg 271 Seaborgium transitionmetal 107 Bh 272 Bohrium transitionmetal 108 Hs 270 Hassium transitionmetal 109 Mt 276 Meitnerium transitionmetal 110 Ds 281 Darmstadtium transitionmetal 111 Rg 280 Roentgenium transitionmetal 112 Cn 285 Copernicium transitionmetal 113 Uut 284 Ununtrium metal 114 Uuq 289 Ununquadium metal 115 Uup 288 Ununpentium halogen 116 Uuh 293 Ununhexium noblegas 117 Uus 294 Ununseptium alkalimetal 118 Uuo 294 Ununoctium alkalineearthmetal

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

How do Excel Pivot Tables handle data from non OLAP databases?

Answered: 1 week ago