Thread: Glossary Help

  1. #1
    Registered User
    Join Date
    Oct 2005
    Posts
    7

    Glossary Help

    The problem is that im trying to do a glossary. I constructed the glossary but I could not get the program to read spaces in words when the program was searching to solve this I inserted underscores and the search worked fine. For some mysterious reason the code is different and it doesnt work now. Is there a way for th eprogram to read spaces and if not what is wrong with the current code.

    Code:
     //Attempt at making a faster glossary program using binary search
    
    #include <stdio.h>
    
    struct entry
    {
                char word[600];
                char definition[600];
                };
                
                //Here goes nothing... character strings... fun for all
                
                int compareStrings (const char s1[], const char s2[])
                {
                    int i = 0, answer;
                    while (s1[i] == s2[i] && s1[i] != '\0'&& s2[i] != '\0') 
                    ++i;
                    
                    if (s1[i] < s2[i])
                    answer = -1;
                    else if (s1[i] == s2[i])
                    answer = 0;
                    
                    else
                        answer = 1;
                    
                    return answer;
                    }
                    
                    //Alrighty, here comes the real thing, the glossary.
                    
                    int lookup (const struct entry dictionary[], const char search[], const int entries)
                    
                    {
                        int low = 0;
                        int high = entries - 1;
                        int mid, result;
                        int compareStrings (const char s1[], const char s2[]);
                        
                        while (low <= high)
                        {
                              mid = (low+high) / 2;
                              result = compareStrings (dictionary[mid].word, search);
                              
                              if (result == -1)
                                 low = mid + 1;
                              else if (result == 1)
                                   high = mid - 1;
                              else
                                  return mid; /*Let's hope this happens often. This runs if the word is found.*/
                                  }
                                  return -1; /*Ah well, better luck next time!*/
                                  } 
                                    int main (void)
              {
                  const struct entry dictionary[600] =
                  { { "absolute_zero", "The zero point on the Kelvin temperature scale, equivalent to -273C; all molecular motion theoretically stops at this temperature."},
                    { "accepted_value", "A quantity used by general agreement of the scientific community."},
                    { "accuracy", "The closeness of a measurement to the true value of what is being measured."},
                    { "acid", "A compound containing hydrogen that ionizes to yield hydrogen ions (H+) in water."},
                    { "acid_dissociation_constant", "(Ka) The ratio of the concentration of the dissociated form of an acid to the undissociated form; stronger acids have large Ka values than weaker acids."},
                    { "acidic_solution", "Any solution in which the hydrogen-ion concentration is greater than the hydroxide-ion concentration."},
                    { "actinium", "Metal with a chemical symbol of Ac, atomic number of 89 and an atomic mass of 227 g/mol"},
                    { "activated_complex", "An unstable arrangement of atoms that exists momentarily at the peak of the activation energy barrier; it represents an intermediate or transitional structure formed during the course of a reaction."},
                    { "activation_energy", "The minimum energy colliding particles must have in order to react."},
                    { "activity_series_of_metals", "A table listing metals in order of decreasing activity."},
                    { "actual_yield", "The amount of product that forms when a reaction is carried out in the laboratory."},
                    { "addition_reaction", "A reaction in which a substance is added at the double bond of an alkene or at the triple bond of an alkyne."},
                    { "alcohol", "An organic compound having an -OH (hydroxyl) group; the general structure R-OH."},
                    { "aldehyde", "An organic compound in which the carbon of the carbonyl group is joined to at least one hydrogen; the general formula is RCHO."},
                    { "aliphatic_compound", "A hydrocarbon compound that does not contain a ring structure."},
                    { "alkali_metal", "Any metal in group 1A of the periodic table."},
                    { "alkali_earth metal", "Any metal in group 2A of the periodic table."},
                    { "alkaline_solution", "A basic solution."},
                    { "alkane", "A hydrocarbon containing only single covalent bonds; alkanes are saturated hydrocarbons."},
                    { "alkene", "A hydrocarbon containing one or more carbon-carbon double bonds; alkenes are unsaturated hydrocarbons."},
                    { "alkyl_group", "A hydrocarbon substituent; methyl (CH3) is an alkyl group."},
                    { "alkyl_halide", "A halocarbon in which one or more halogen atoms are attached to the carbon atoms of an aliphatic chain."},
                    { "alkyne", "A hydrocarbon containing a carbon-carbon triple bond; alkynes are unsaturated hydrocarbons."},
                    { "allotrope", "A molecular form of an element that exists in two or more different forms in the same physical state; oxygen, O2, and ozone O3 are allotropes of the element oxygen."},
                    { "alpha_particle", "A positively charged particle emitted from certain charged nuclei; it consists of two protons and two neutrons and is identical to the nucleus of a helium atom."},
                    { "alpha_radiation", "Alpha particles emitted from the radioactive source."},
                    { "aluminium", "Metal with a chemical symbol of Al, atomic number of 13 and an atomic mass of 26.9 g/mol"},
                    { "americium", "Metal with a chemical symbol of Am, atomic number of 95 and an atomic mass of 243 g/mol"},
                    { "amino_acid", "An organic compound having amino (-NH2) and carboxylic acid (-COOH) groups in the same molecule; proteins are made of the twenty naturally occurring amino acids."},
                    { "amphoteric", "A substance that can act both as an acid and a base; water is amphoteric."},
                    { "amplitude", "The height of a wave from the origin to the crest."},
                    { "amorphous_solid", "A term used to describe a solid that lacks an ordered internal structure; denotes a random arrangement of atoms."},
                    { "analytical_chemistry", "The study of the composition of substances."},
                    { "anion", "Any atom or group or group of atoms with a negative charge."},
                    { "anode", "The electrode at which oxidation occurs."},
                    { "antibonding_orbital", "A molecular orbital whose energy is higher than that of the atomic orbitals from which it is formed."},
                    { "antimony", "Metalloid with a chemical symbol of Sb, atomic number of 51 and an atomic mass of 121. g/mol"},
                    { "aqueous_solution", "A solution in which the solvent is water."},
                    { "arene", "Any member of a special group of unsaturated cyclic hydrocarbons."},
                    { "argon", "Gas with a chemical symbol of Ar, atomic number of 18 and an atomic mass of 39.95 g/mol"},
                    { "aromatic_compound", "A name originally given to the arenes because many of them have pleasant odors."},
                    { "arsenic", "Metalloid with a chemical symbol of As, atomic number of 33 and an atomic mass of 74.92 g/mol"},
                    { "astatine", "Nonmetal with a chemical symbol of At, atomic number of 85 and an atomic mass of 210 g/mol"},
                    { "aryl_halide", "A halocarbon in which one or more halogens are attached to the carbon atoms of an arene ring."},
                    { "asymmetric_carbon", "A carbon atom that has four different groups attached."},
                    { "atom", "The smallest particle of an element that retains the properties of that element."},
                    { "atomic_emission_spectrum", "The pattern of frequencies obtained by passing light emitted by atoms of an element in the gaseous state through a prism; the emission spectrum of each element is unique to that element."},
                    { "atomic_mass", "The weighted average of the masses of the isotopes of an element."},
                    { "atomic_mass unit", "A unit of mass equal to one-twelfth the mass of a carbon-12 atom."},
                    { "atomic_number", "The number of protons in the nucleus of an atom of an element."},
                    { "atomic_orbital", "A region in space around the nucleus of an atom where there is a high probability of finding an electron."},
                    { "atomic_radius", "One-half the distance between the nuclei in a molecule consisting of identical atoms."},
                    { "atmospheric_pressure", "The pressure exerted by air molecules in the atmosphere surrounding the earth, resulting from collisions of air molecules with objects."},
                    { "aufbau_principle", "Electrons enter orbitals of lower energy first."},
                    { "avogadros_hypothesis", "Equal volumes of gases at the same temperature and pressure contain equal numbers."},
                    { "avogadros_number", "The number of particles contained in one mole of a substance; equal to 6.02 X 10 to the 23rd power particles."},
                    { "balanced_equation", "A chemical equation in which mass is conserved; each side of the equation has the same number of atoms of each element."},
                    { "band_of_stability", "The location of stable nuclei on a neutron-vs.-proton plot."},
                    { "barium", "Metal with a chemical symbol of Br, atomic number of 56 and an atomic mass of 137.3 g/mol."},
                    { "barometer", "An instrument used to measure atmospheric pressure."},
                    { "base", "A compound that ionizes to yield hydroxide ions (OH-) in water."},
                    { "base_dissociation_constant", "(Kb) The ratio of the concentration of the dissociated form of a base to the undissociated form."},
                    { "basic_solution", "Any solution in which the hydroxide-ion concentration is greater than the hydrogen-ion concentration."},
                    { "battery", "A group of voltaic cells that are connected together."},
                    { "benedicts_test", "A test commonly used to detect the presence of aldehydes."},
                    { "berkelium", "Metal with a chemical symbol of Br, atomic number of 97 and an atomic mass of 347 g/mol."},
                    { "beta_particles", "A fast-moving electron emitted from certain radioactive nuclei; it is formed when a neutron decomposes."},
                    { "beta_radiation", "Fast-moving electrons (beta particles) emitted from radioactive source."},
                    { "binary_compound", "A compound composed of two elements; NaCl is an example of a binary compound."},
                    { "biochemistry", "The study of the composition and changes in composition of living organisms."},
                    { "bismuth", "Metalloid with a chemical symbol of Bi, atomic number of 83 and an atomic mass of 209.0 g/mol."},
                    { "bohrium", "Metal with a chemical symbol of Bh, atomic number of 107 and an atomic mass of 264 g/mol."},
                    { "boiling_point", "(bp) The temperature at which the vapor pressure of a liquid is just equal to the external pressure on the liquid."},
                    { "boiling_point_elevation", "The difference in temperature between the boiling points of a solution and of the pure solvent."},
                    { "bond_dissociation_energy", "The amount of energy required to break a bond between atoms; it is usually expressed in kJ per mol of substance."},
                    { "bonding_orbital", "A molecular orbital whose energy is lower than that of the atomic orbitals from which it is formed."},
                    { "boron", "Metalloid with a chemical symbol of B, atomic number of 5 and an atomic mass of 10.81 g/mol."},
                    { "boyles_law", "For a fixed mass of gas at constant temperature, the volume of the gas varies inversely with pressure."},
                    { "branched_chain_alkene", "An alkene with one or more alkyl groups attached."},
                    { "brownian_motion", "The chaotic movement of colloidal particles, caused by the collision with water molecules of the medium in which they are dispersed."},
                    { "buffer", "A solution in which the pH remains relatively constant when small amounts of acid or base are added; it consists of a solution of a weak acid and the salt of a weak acid (or a solution of a weak base with the salt of a weak base)."},
                    { "buffer_capacity", "A measure of the amount of acid or base that may be added to a buffer solution before a significant change in pH occurs."},
                    { "cadmium", "Metal with a chemical symbol of Cd, atomic number of 48 and an atomic mass of 112.4 g/mol."},
                    { "calcium", "Metal with a chemical symbol of Ca, atomic number of 20 and an atomic mass of 40.08 g/mol."},
                    { "californium", "Metal with a chemical symbol of Cf, atomic number of 98 and an atomic mass of 251 g/mol."},
                    { "calorie", "(cal) The quantity of heat that raises the temperature of 1g of pure water 1C"},
                    { "calorimeter", "An apparatus for measuring heat changes."},
                    { "calorimetry", "The measurement of heat changes."},
                    { "carbohydrate", "The name given to a group of monomers and polymers of aldehudes and ketones that have numerous hydroxyl groups attached; sugars and starches are carbohydrates."},
                    { "carbon", "Metalloid with a chemical symbol of C, atomic number of 6 and an atomic mass of 12.01 g/mol."},
                    { "carbonyl_group", "A functional group having a carbon atom and an oxygen atom joined by a double bond; it is found in aldehydes, ketones, esters, and amides."},
                    { "carboxyl_group", "A functional group consisting of a carbonyl group attached to a hydroxyl group; it is found in carboxylic acids."},
                    { "catalyst", "A substance that speeds up a reaction without being used up."},
                    { "cathode", "The electrode at which reduction occurs."},
                    { "cathode_ray", "A stream of electrons produced at the negative electrode (cathode) of a tube containing a gas at low pressure."},
                    { "cation", "Any atom or group of atoms with a positive charge."},
                    { "cell_potential", "The difference between the reduction potentials of two half-cells."},
                    { "celsius_temperature_scale", "The temperature scale on which the freezing point of water is 0 degrees and the boiling point is 100 degrees."},
                    { "cerium", "Metal with a chemical symbol of Ce, atomic number of 58 and an atomic mass of 140.1 g/mol."},
                    { "cesium", "Metal with a chemical symbol of Cs, atomic number of 55 and an atomic mass of 132.90 g/mol."},
                    { "charless_law", "The volume of a fixed mass of gas is directly proportional to its Kelvin temperature if the pressure is kept constant."},
                    { "chemical_equation", "An expression representing a chemical reaction; the formulas of the reactants (on the left) are connected by an arrow with the formulas for the products (on the right)."},
                    { "chemical_equilibrium", "A state of balance in which forward and reverse reactions are taking place at the same rate; no net change in the amounts of reactants and products occurs in the chemical system."},
                    { "chemical_formula", "A shorthand method used to show the number and type of atoms present in the smallest representative unit of a substance; the chemical formula of ammonia, with one and three hydrogens, is NH3."},
                    { "chemical_potential_energy", "Energy stored within the structural units of chemical substances."},
                    { "chemical_property", "The ability of a substance to undergo chemical reactions to form new substances."},
                    { "chemical_symbol", "A one or two letter representation of an element."},
                    { "chemistry", "The study of the structure, properties, and composition of substances, and the changes that substances undergo."},
                    { "chlorine", "Non-metal with a chemical symbol of Cl, atomic number of 17 and an atomic mass of 35.45 g/mol."},
                    { "chromium", "Metal with a chemical symbol of Cr, atomic number of 24 and an atomic mass of 52.00 g/mol."},
                    { "cis_configuration", "A term applied to geometric isomers; it denotes an arrangement in which the substituted groups are on the same side of the double bond."},
                    { "cobalt", "Metal with a chemical symbol of Co, atomic number of 27 and an atomic mass of 58.93 g/mol."},
                    { "coefficient", "A small whole number that appears in front of a formula in a balanced chemical equation."},
                    { "colligative_properties", "A property of a solution that depends on the concentration of the solute particles; boiling point elevation, freezing point depression, and vapor pressure lowering are colligative properties."},
                    { "collision_theory", "Atoms, ions, and molecules with sufficient kinetic energy can form chemical bonds when they collide."},
                    { "colloid", "A liquid mixture containing particles that are intermediate in size between those of a suspension and a true solution; these particles are evenly distributed throughout the liquid and do not settle out with time."},
                    { "combination_reaction", "A chemical change in which two or more substances react to form a single new substance; also called a synthesis reaction."},
                    { "combined_gas_law", "A relationship describing the behavior of gases that combines Boyle's Law, Charles's Law and Gay Lussac's Law."},
                    { "combustion_reaction", "A chemical change in which oxygen reacts with another substance, often producing energy in the form of heat and light."},
                    { "common_ion", "An ion that is common to both salts in a solution; in a solution of silver nitrate and silver chloride, Ag+ would be a common ion."},
                    { "common_ion_effect", "A decrease in the solubility of a substance caused by the addition of a common ion."},
                    { "complete_ionic_equation", "An equation for a reaction in solution showing all strong electrolytes as ions."},
                    { "compound", "A substance that can be separated into simpler substances (elements or other compounds) only by chemical reactions."},
                    { "concentrated_solution", "A solution containing a large amount of solute."},
                    { "concentration", "A measurement of the amount of solute that is dissolved in a given quantity of solvent; usually expressed as mol/L."},
                    { "condensed_structural_formula", "A structural formula that leaves out some bonds and/or atoms; the presence of these atoms or bonds is understood."},
                    { "conjugate_acid", "The particle formed when a base gains a hydrogen atom."},
                    { "conjugate_acid_base_pair", "Two substances that are related by the loss or gain of a single hydrogen ion. Ammonia and the ammonium ion are a conjugate acid-base pair."},
                    { "conjugate_base", "The particle that remains when an acid has donated a hydrogen ion."},
                    { "continuous_chain_alkene", "A hydrocarbon that contains any number of carbon atoms in a straight chain."},
                    { "conversion_factor", "A ratio of equivalent units used to express the relationship between quantities expressed in different units."},
                    { "coordinate_covalent_bond", "A covalent bond formed when one atom contributes both bonding electrons."},
                    { "coordinate_number", "The number of ions of opposite charge that surround each ion in a crystal."},
                    { "copper", "Metal with a chemical symbol of Cu, atomic number of 29 and an atomic mass of 63.55 g/mol."},
                    { "cracking", "The controlled process by which hydrocarbons are broken down or rearranged into smaller, more useful molecules."},
                    { "crystal", "A substance in which the atoms, ions, or molecules are arranged in an orderly, repeating, three-dimensional pattern called a crystal lattice."},
                    { "curium", "Metal with a chemical symbol of Cm, atomic number of 96 and an atomic mass of 247 g/mol."},
                    { "cyclic_hydrocarbon", "An organic compound that contains a hydrocarbon ring."},
                    { "daltons_atomic_theory", "The first theory to relate chemical changes to events at the atomic level."},
                    { "daltons_law_of_partial_pressures", "At constant volume and temperature, the total pressure of a mixture of gases is the sum of the partial pressures of all the gases present."},
                    { "de_broglies_equation", "An equation that describes the wavelength of a moving particle; it predicts that all matter exhibits wavelike motions."},
                    { "decomposition_reaction", "A chemical change in which a single compound is broken down into two or more simpler products."},
                    { "dehydrogenation_reaction", "A chemical change in which hydrogen is lost."},
                    { "deliquescent", "A term describing a substance that removes sufficient water from the air to form a solution; the process occurs when the solution formed has a lower vapor pressure than that of the water in the air."},
                    { "denatured_alcohol", "Ethanol to which a poisonous substance has been added to make it unfit to drink."},
                    { "density", "The ratio of the mass of an object to its volume."},
                    { "dessicant", "A hygroscopic substance used as a drying agent."},
                    { "diffusion", "The tendency of molecules and ions to move toward areas of lower concentration until the concentration is uniform throughout the system."},
                    { "dilute_solution", "A solution that contains a small amount of solute."},
                    { "dimensional_analysis", "A technique of problem-solving that uses the units that are part of a measurement to help solve the problem."},
                    { "dipole", "A molecule that has two electrically charged regions, or poles."},
                    { "dipole_interaction", "A weak intermolecular force resulting from the attraction of oppositely charged regions of polar molecules."},
                    { "diprotic_acid", "Any acid that contains two ionizable protons (hydrogen ions); sulfuric acid is a diprotic acid."},
                    { "disaccharide", "A carbohydrate formed from two monosaccharide units; common table sugar (sucrose) is a disaccharide."},
                    { "dispersion_force", "The weakest kind of intermolecular attraction; thought to be caused by the motion of electrons."},
                    { "distillation", "A purification process in which a liquid is evaporated and then condensed again to a liquid; used to separate dissolved solids from liquids or liquids from liquids according to boiling points."},
                    { "double_covalent_bond", "A covalent bond in which two pairs of electrons are shared by two atoms."},
                    { "double_replacement_reaction", "A chemical change that involves an exchange of positive ions between two compounds."},
                    { "dry_cell", "A commercial voltaic cell in which the electrolyte is moist paste."},
                    { "dubnium", "Metal with a chemical symbol of Db, atomic number of 105 and an atomic mass of 247 g/mol."},
                    { "dysprosium", "Metal with a chemical symbol of Dy, atomic number of 66 and an atomic mass of 162.5 g/mol."},
                    { "effloresce", "To lose water of hydration; the process occurs when the hydrate has a vapor pressure higher than that of water vapor in the air."},
                    { "effusion", "A process that occurs when a gas escapes through a tiny hole in its container."},
                    { "einsteinium", "Metal with a chemical symbol of Es, atomic number of 99 and an atomic mass of 252 g/mol."},
                    { "electrical_potential", "The ability of a voltaic cell to produce an electric current."},
                    { "electrochemical_cell", "Any device that converts chemical energy into electrical energy or electrical energy into chemical energy."},
                    { "electrochemical_process", "The conversion of chemical energy into electrical energy or electrical energy into chemical energy; in an electrochemical cell, all electrochemical processes involve redox reactions."},
                    { "electrode", "A conductor in a circuit that carries electrons to or from a substance other than a metal."},
                    { "electrolysis", "A process in which electrical energy is used to bring about a chemical change."},
                    { "electrolyte", "An compound that conducts an electric current in aqueous solution or in the molten state; all ionic compounds are electrolytes, but covalent compounds are not."},
                    { "electrolytic_cell", "An electrochemical cell used to cause a chemical change through the application of electrical energy."},
                    { "electromagnetic_radiation", "A series of energy waves that travel in a vacuum at a speed of 3.0 x 10 power 10 cm/s; includes radio waves, microwaves, visible light, infrared and ultra-violet light, x-rays, and gamma rays."},
                    { "electron", "A negatively charged subatomic particle."},
                    { "electron_configuration", "The arrangement of electrons around the nucleus of an atom in its ground state."},
                    { "electron_dot_structures", "A notation that depicts valence electrons as dots around the atomic symbol of the element; the symbol represents the inner electrons and atomic nucleus also called Lewis dot structures."},
                    { "electronegativity", "The tendency for an atom to attract electrons to itself when it is chemically combined with another elements."}, 
                    { "element", "A substance that cannot be changed into a simpler substance under normal laboratory conditions."},
                    { "elementary_reaction", "A reaction in which reactants are converted to products in a single step."},
                    { "empirical_formula", "A formula with the lowest whole-number ratio of elements in a compound; the empirical formula of hydrogen peroxide."},
                    { "emulsion", "The colloidal dispersion of one liquid in another."},
                    { "endothermic_process", "Heat absorbing process."},
                    { "end_point", "The point in a titration at which neutralization is just achieved."},
                    { "energy", "The capacity for doing work; it exists in several forms, including chemical, nuclear, electrical, radiant, mechanical, and thermal energies."},
                    { "energy_level", "A region around the nucleus of an atom where an electron is likely to be moving."},
                    { "enthalpy", "(H) The amount of heat that a substance has at a given temperature and pressure."},
                    { "entropy", "(S) A measure of the disorder of a system; systems tend to go from a state of order (low entropy) to a state of maximum disorder (high entropy)"},
                    { "enzyme", "A biological catalyst, almost always a problem."},
                    { "equilibrium_constant", "The ratio of product concentrations to reactant concentrations with each raised to a power given by the number of moles of substance in the balanced chemical equation."},
                    { "equilibrium_position", "The relative concentrations of reactants and products of a reaction that has reached equilibrium; it indicates whether the reactants or products are favored in the reversible reaction."},
                    { "equivalence_point", "The point in a titration at which the number of equivalents of acid and base are equal."},
                    { "equivalent", "(equiv.) One equivalent is the amount of an acid  (or base) that can give one mole of hydrogen (or hydroxide) ions."},
                    { "erbium", "Metal with a chemical symbol of Er, atomic number of 68 and an atomic mass of 167.3 g/mol."},
                    { "europeum", "Metal with a chemical symbol of Eu, atomic number of 63 and an atomic mass of 152.0 g/mol."},
                    { "error", "The difference between the accepted value and experimental value."},
                    { "ester", "A derivative of a carboxylic acid in which the -OH of the carbonyl group has been replaced by the -OR from an alcohol; the general formula is RCOOR."}, /*Ugh, an apostrophe, must debug this later. Forced to use underscores rather than spaces to create a makeshift solution to the problem of compound terms.*/
                    { "ether", "An organic compound in which oxygen  is bonded to two carbon groups; the general formula is R-O-R"},
                    { "evaporation", "The vaporization of a liquid in an open container."},
                    { "excess_reagent", "A reagent present in a quantity that is more than sufficient to react with a limiting reagent; any reactant that remains after the limiting reagent is used in a chemical reaction."},
                    { "exergonic", "A spontaneous reaction that releases free energy."},
                    { "exothermic_process", "A heat dissipating process."},
                    { "experiment", "A carefully controlled, repeatable procedure for gathering data to test a hypothesis."},
                    { "experimental_value", "The quantitative result of an experimental measurement."},
                    { "fatty_acid", "The name originally given to continuous chain carboxylic acids first isolated from fats."},
                    { "fehlings_test", "A test used to detect aldehydes."},
                    { "fermentation", "The production of ethanol from sugars by the action of yeast or bacteria."},
                    { "fermium", "Metal with a chemical symbol of Fm, atomic number of 100 and an atomic mass of 257 g/mol."},
                    { "film_badge", "A small radiation detector worn by persons who work near radiation sources; it is several layers of photographic film covered with black light-proof paper."},
                    { "first_order_reaction", "A reaction in which the reaction rate is proportional to the concentration of only one reactant."},
                    { "fission", "The splitting of a nucleus into smaller fragments, accompanied by the release of neutrons and a large amount of energy."},
                    { "flourine", "Non-metal with a chemical symbol of F, atomic number of 9 and an atomic mass of 19.00 g/mol."},
                    { "formula_unit", "The lowest whole-number ratio of ions in an ionic compound; in magnesium chloride, the ratio of magnesium ions to chloride ions is 1:2 and the formula unite is MgCl2."},
                    { "francium", "Metal with a chemical symbol of Fr, atomic number of 87 and an atomic mass of 223 g/mol."},
                    { "free_energy", "The potential energy contained in a reaction system; the energy available to do work."},
                    { "freezing_point_depression", "The difference in temperature between the freezing points of a solution and of the pure solvent."},
                    { "frequency", "(v) The number of wave cycles that pass a given point per unit of time."},
                    { "fuel_cell", "A voltaic cell in which a fuel substance undergoes oxidation to produce electrical power."},
                    { "functional_group", "A specific arrangement of atoms in an organic compound that is capable of characteristic chemical reactions; the chemistry of an organic compound is determined by its functional groups."},
                    { "fusion", "A reaction in which two light nuclei combine to produce a nucleus of heavier mass, accompanied by the release of a large amount of energy."},
                    { "gadolinium", "Metal with a chemical symbol of Gd, atomic number of 64 and an atomic mass of 157.3 g/mol."},
                    { "gallium", "Metal with a chemical symbol of Ga, atomic number of 31 and an atomic mass of 69.72 g/mol."},
                    { "gamma_radiation", "High energy electromagnetic radiation emitted by certain radioactive nuclei; gamma rays have no mass or electrical charge."},
                    { "gas", "Matter that has no definite shape or volume; it adopts the shape and volume of its container."},
                    { "gas_pressure", "A force resulting from the simultaneous collisions of billions of gas particles on an object."},
                    { "geiger_counter", "A gas-filled metal tube used to detect the presence of beta radiation."},
                    { "geometric_isomer", "An organic compound that differs from another compound only in the geometry of their substituted groups."},
                    { "germanium", "Metalloid with a chemical symbol of Ge, atomic number of 32 and an atomic mass of 72.59 g/mol."},
                    { "gibbs_free_energy_charge", "The maximum amount of energy that can be coupled to another process to do useful work."},
                    { "glass", "The optically transparent fusion product of inorganic materials that have cooled to a rigid state without crystallizing."},
                    { "gold", "Metal with a chemical symbol of Au, atomic number of 79 and an atomic mass of 197.0 g/mol."},                
                    { "grahams_laws_of_effusion", "The rate of effusion of a gas is inversely proportional to the square root of its formula mass; this relationship is also true for the diffusion of gases."},
                    { "gram", "A metric unit equal to the mass of 1 cubed cm of water at 4C."},
                    { "gram_atomic_mass", "(gam) The mass, in grams of one mole of atoms in a monoatomic element; it is numerically equal to the atomic mass in amu."},
                    { "gram_equivalent_mass", "The mass of one equivalent of a substance."},
                    { "gram_molecular_mass", "(gmm) The mass of one mole of a molecular substance; it is equal to the formula mass expressed in grams."},
                    { "ground_state", "The lowest energy level occupied by an electron when an atom is in its most stable energy state."},
                    { "group", "A vertical column of elements in the periodic table; the constituent elements of a group have similar chemical and physical properties."},
                    { "hafnium", "Metal with a chemical symbol of Hf, atomic number of 72 and an atomic mass of 178.5 g/mol."},
                    { "half_cell", "The part of a voltaic cell in which either oxidation or reduction occurs; it consists of a single electrode immersed in a solution of its ions."},
                    { "half_life", "The time required for one-half of the atoms of a radioisotope to emit radiation and decay to products."},
                    { "half_reaction", "An equation showing either the reduction of the oxidation of a species in an oxidation-reduction reaction."},
                    { "half_reaction_method", "A method of balancing redox equation by balancing the oxidation and reduction half-reaction."},
                    { "halide_ions", "A negative ion formed when the halogen atom gains an electron."},
                    { "halocarbon", "Any member of the class of organic compounds containing covalently bonded fluorine, chlorine, bromine, or iodine."},
                    { "halogen", "Any member of the non-metallic elements in group 7A of the periodic table."},
                    { "heat", "The energy that is transferred from one body to another because of a temperature difference."},
                    { "heat_capacity", "The quantity of heat required to change an object temperature by exactly 1 degree Celcius."},
                    { "heat_of_combustion", "The heat absorbed or released during a chemical reaction in which one mole of a substance is completely burned."},
                    { "heat_of_reaction", "The heat released or absorbed during a chemical reaction; equivalent to H, the change in enthalpy."},
                    { "heisenberg_uncertainty_principle", "It is impossible to know both the velocity and the position of a particle at the same time."},
                    { "henrys_law", "At a given temperature the solubility of a gas in a liquid is directly proportional to the pressure of the gas above the liquid."},
                    { "hertz", "(Hz) The unit of frequency equal to one cycle per second."},
                    { "hassium", "Metal with a chemical symbol of Hs, atomic number of 108 and an atomic mass of 265 g/mol."},
                    { "helium", "Gas with a chemical symbol of He, atomic number of 2 and an atomic mass of 4.003 g/mol."},
                    { "hesss_law_of_constant_heat_summation", "In going from a particular set of reactants to a particular set of products the enthalpy change is the same whether the reaction takes place in one step or in series of steps."},
                    { "heterogeneous_mixture", "A mixture that is not uniform in composition; its components are readily distinguished."},
                    { "heterogeneous_reaction", "A reaction carried out with a heterogeneous mixture of reactants."},
                    { "holmium", "Metal with a chemical symbol of Ho, atomic number of 67 and an atomic mass of 164.9 g/mol."},
                    { "homogeneous_mixture", "A mixture that is completely uniform in composition; its components are not distinguishable."},
                    { "homologous_series", "A series formed by a group of compounds in which there is a constant increment of change in molecular structure from one compound in the series of the next."},
                    { "hunds_rule", "When electrons occupy orbitals of equal energy, one electron enters each orbital until all orbitals contain one electron with their spins parallel."},
                    { "hybridization", "A process in which several atomic orbitals (such as s and p orbitals) mix to form the same number of equivalent hybrid orbitals."},
                    { "hydration_reaction", "A reaction in which water is added to an alkene."},
                    { "hydrocarbon", "An organic compound that contains only carbon and hydrogen."},
                    { "hydrogen", "Non-metal with a chemical symbol of H, atomic number of 1 and an atomic mass of 1.008 g/mol."},
                    { "hydrogenation_reaction", "A reaction in which hydrogen is added to carbon-carbon double bond to give alkane."},
                    { "hydrogen_bomb", "A relatively strong intermolecular force in which a hydrogen atom that is covalently bonded to a very electronegative atom is also weakly bonded to an unshared electron pair of an electronegative atom in the same molecule or one nearby."},
                    { "hydrogen_ion_acceptor", "A base according to the Bronstead Lowry theory."},
                    { "hydrogen_ion_donor", "An acid, according to the Bronstead Lowry theory."},
                    { "hydrometer", "A device used to measure the specific gravity of a liquid."},
                    { "hydronium_ion", "The positive ion formed when a water molecule gains a hydrogen ion; all hydrogen ions in aqueous solution are present as hydronium ions."},
                    { "hydroxide_ion", "The negative ion formed when a water molecule loses a hydrogen ion."},
                    { "hydroxyl_group", "the -OH functional group present in alcohols."},
                    { "hygroscopic", "A term describing salts and other compounds that remove moisture from the air."},
                    { "hypothesis", "A descriptive model used to explain observations"},
                    { "ideal_gas_constant", "(R) A term in the ideal gas law, which has the value 8.31(L x kPa)/(K x mol)."},
                    { "ideal_gas_law", "The relationship P x V = n x R x T, which describes the behavior of an ideal gas."},
                    { "immiscible", "Liquids that are insoluble in one another; oil and water are immiscible."},
                    { "indium", "Metal with a chemical symbol of In, atomic number of 49 and an atomic mass of 114.8 g/mol."},
                    { "inhibitor", "A substance that interferes with catalysis."},
                    { "inorganic_chemistry", "The study of substances that do not contain carbon."},
                    { "intermediate", "A product of a reaction that immediately becomes a reactant of another reaction."},
                    { "international_system_of_units", "(SI) The revised version of the metric system, adopted by the international agreement in 1960."},
                    { "iodine", "Non-metal with a chemical symbol of I, atomic number of 53 and an atomic mass of 126.9 g/mol."},
                    { "ion", "An atom or group of atoms that has a positive or negative charge; cations are ions with a positive charge, and anions are ions with a negative charge."},
                    { "ionic_bond", "The electrostatic attraction that binds oppositely charged ions together."},
                    { "ionic_compound", "A compound composed of positive and negative ions."}, 
                    { "ionization_energy", "The energy required to remove an electron from a gaseous atom."},                                                 
                    { "ionizing_radiation", "Radiation which has enough energy to produce ions by knocking electrons off some of the atoms it strikes."},                
                    { "ion_product_constant_for_water", "(k) the product of the hydrogen ion and hydroxide ion concentrations of water; it is 1 x 10 to the 14th power at 25C."},
                    { "iridium", "Metal with a chemical symbol of Ir, atomic number of 77 and an atomic mass of 192.2 g/mol."},
                    { "iron", "Metal with a chemical symbol of Fe, atomic number of 26 and an atomic mass of 55.85 g/mol."},
                    { "isotopes", "Atoms of the same atomic number but different atomic masses due to a different number of neutrons."},
                    { "iupac_system", "An internationally accepted system of naming compounds proposed by the International Union of Pure and Applied Chemistry."},
                    { "joule", "(j) the SI unit of energy; 4.184 joules equal 1.000 calorie."},
                    { "kelvin_temperature_scale", "The temperature scale in which the freezing point of water is 273 K and the boiling point is 373 K; 0 K is absolute zero."},
                    { "ketone", "An organic compound in which the carbon of the carbonyl group is joined to two other carbons; the general formula is RCOR."},
                    { "kilogram", "(kg) The mass of 1 L of water at 4 degrees celcius; it is the base unit of mass in the metric system."}, 
                    { "kinetic_energy", "The energy an object has because of its motion."},
                    { "kinetic_theory", "A theory explaining the states of matter, based on the concept that the particles in all forms of matter are in constant motion."},
                    { "krypton", "Gas with a chemical symbol of Kr, atomic number of 36 and an atomic mass of 83.80 g/mol."},
                    { "lanthanium", "Metal with a chemical symbol of La, atomic number of 57 and an atomic mass of 138.9 g/mol."},
                    { "law_of_conservation_of_energy", "Energy is neither created nor destroyed in an ordinary chemical or physical process."},
                    { "law_of_conservation_of_mass", "Mass can be neither created nor destroyed in an ordinary chemical or physical process."},
                    { "law_of_definite_proportions", "In any chemical compound, the elements are always combined in the same proportion by mass."},
                    { "law_of_disorder", "It is natural tendency of systems to move in the direction of maximum chaos or disorder."},
                    { "law_of_multiple_proportions", "Whenever two elements form more than one compound, the different masses of one element that combine with the same mass of the other element are in the ratio of small whole numbers"},
                    { "lawrencium", "Metal with a chemical symbol of Lr, atomic number of 103 and an atomic mass of 260 g/mol."},
                    { "lead", "Metal with a chemical symbol of Pb, atomic number of 82 and an atomic mass of 207.2 g/mol."},
                    { "lechateliers_principle", "When stress is applied to a system at equilibrium, the system changes to relieve the stress."},
                    { "lewis_acid", "Any substance that can accept a pair of electrons to form a covalent bond."},
                    { "lewis_base", "Any substance that can donate a pair of electrons to form a covalent bond."},
                    { "limiting_reagent", "Any reactant that is used up first in a chemical reaction; it determines the amount of product that can be formed in the reaction."},
                    { "lime", "Calcium oxide, CaO; it is sometimes called quicklime."},
                    { "lipid", "A member of a large class of relatively water-insoluble organic compounds; fats, oils, and waxes are lipids."},
                    { "liquid", "A form of matter that flows, has a fixed volume, and takes the shape of its container."},
                    { "liter", "(L) the volume of a cube measuring 10 centimeters on each edge (1000 cubic cm); it is the common unprefixed unit of volume in the metric system."},
                    { "lithium", "Metal with a chemical symbol of Li, atomic number of 3 and an atomic mass of 6.941 g/mol."},
                    { "lutenium", "Metal with a chemical symbol of Lu, atomic number of 71 and an atomic mass of 175.0 g/mol."},
                    { "magnesium", "Metal with a chemical symbol of Mg, atomic number of 12 and an atomic mass of 24.31 g/mol."},
                    { "manganese", "Metal with a chemical symbol of Mn, atomic number of 25 and an atomic mass of 54.94 g/mol."},
                    { "mass", "The amount of matter than an object contains; the SI base unit of mass is the kilogram."},
                    { "mass_number", "The total number of protons and neutrons in the nucleus of an atom."},
                    { "matter", "Anything that takes up space and has mass."},
                    { "meiterenium", "Metal with a chemical symbol of Mt, atomic number of 109 and an atomic mass of 268 g/mol."},
                    { "melting_point", "(mp) the temperature at which a substance changes from solid to a liquid; the melting point of water is 0 degrees celcius."},
                    { "mendelevium", "Metal with a chemical symbol of Md, atomic number of 101 and an atomic mass of 258 g/mol."},
                    { "mercury", "Metal with a chemical symbol of Hg, atomic number of 80 and an atomic mass of 200.6 g/mol."},
                    { "metal", "One class of elements that includes a large majority of the known elements; metals are characteristically lustrous, malleable, ductile, and good conductors of electricity."},
                    { "metallic_bond", "The force of attraction that holds metals together; it consists of the attraction of free-floating valence electrons for positively charged metal ions."},
                    { "metalloid", "One of a class of elements having properties of both metals and nonmetals."},
                    { "metallurgy", "The various procedures used to separate metals from their ores."},
                    { "meter", "The base unit of length in the metric and SI measurement systems."},
                    { "miscible", "Liquids that will dissolve in each other."},
                    { "mixture", "A combination of two or more substances that are not chemically combined."},
                    { "molal_boiling_point_elevation_constant", "(Kb) the change in boiling point for a 1 molal solution of a nonvolatile molecular solute."},
                    { "molal_freezing_point_depression_constant", "(Kf) the change in freezing for a 1 molal solution of a nonvalatile molecular solute."},
                    { "molality", "(m) the concentration of solute in a solution expressed as the number of moles of solute dissolved in 1 kilogram (1000g) of solvent."},
                    { "molar_heat_of_fusion", "The energy, in kilojoules, required to melt one mole of a solid."},
                    { "molar_heat_of_vaporization", "The energy, in kilojoules, required to vaporize one mole of a liquid."},
                    { "molar_mass", "An expression sometimes used in place of gram formula mass to refer to the mass of a mole of any element in a compound."},
                    { "molar_volume", "The volume occupied by one mole of a gas at standard temperature and pressure."},
                    { "molarity", "(M) the concentration of a solute in a solution expressed as the number of moles of solute dissolved in  1 L of solution."},
                    { "mole", "(mol) the amount of a substance that contains 6.02 x 10 to the 23rd power representative particles of that substance; a gram formula mass of any substance."},
                    { "molecule", "A neutral chemically bonded group of atoms that act as a unit."},
                    { "molecular_compound", "A compound that is composed of molecules."},
                    { "molecular_formula", "A chemical formula that shows the actual number and kinds of atoms present in a molecule of a compound."},
                    { "molecular_orbital", "An orbital resulting from the overlapping of atomic orbitals when two atoms combine."},
                    { "mole_fraction", "The ratio of the moles of solute in solution to the total number of moles of both solvent and solute."},
                    { "molybdenum", "Metal with a chemical symbol of Mo, atomic number of 42 and an atomic mass of 95.94 g/mol."},
                    { "monel_metal", "A strong, corrosion-resistant alloy of nickel and copper."},
                    { "monomer", "A simple molecule that combines to form the repeating unit of a polymer."},
                    { "monoprotic_acid", "Any acid that contains one ionizable proton (hydrogen ion); nitric acid is a monoprotic acid."},
                    { "monosaccharide", "A carbohydrate consisting of one sugar unit; it is also called a simple sugar."},
                    { "neodynium", "Metal with a chemical symbol of Nd, atomic number of 60 and an atomic mass of 144.2 g/mol."},
                    { "neon", "Gas with a chemical symbol of Ne, atomic number of 10 and an atomic mass of 20.18 g/mol."},
                    { "neptunium", "Metal with a chemical symbol of Np, atomic number of 93 and an atomic mass of 237 g/mol."},
                    { "net_ionic_equation", "An equation for a reaction in a solution showing only those particles that are directly involved in the chemical change."},
                    { "network_solid", "A substance in which all of the atoms are covalently bonded to each other."},
                    { "neutralization_reaction", "A reaction in which an acid and a base react in an aqueous solution to produce a salt and water."},  
                    { "neutral_solution", "An aqueous solution in which the concentrations of hydrogen and hydroxide ions are 1.0 x 10 to the power of -7 mol/L; it has a PH of 7.0"},
                    { "neutron", "A subatomic particle with no charge and a mass of one amu found in the nucleus of the atom."},  
                    { "neutron_absorption", "A process used in a nuclear reactor to slow down the neutrons so they can be captured by the reactor fuel to continue the chain reaction by decreasing the number of moving neutrons; this is done with control rods made of a material like cadmium that absorbs neutrons."},   
                    { "neutron_moderation", "A process used in a nuclear reactor to slow down the neutrons so they can be captured by the reactor fuel to continue the chain reaction; water and carbon are good moderators."}, 
                    { "nickel", "Metal with a chemical symbol of Ni, atomic number of 28 and an atomic mass of 58.69 g/mol."},
                    { "niobium", "Metal with a chemical symbol of Nb, atomic number of 41 and an atomic mass of 92.91 g/mol."},
                    { "nitrogen", "Non-metal with a chemical symbol of N, atomic number of 7 and an atomic mass of 14.01 g/mol."},
                    { "nobelium", "Metal with a chemical symbol of No, atomic number of 102 and an atomic mass of 259 g/mol."},
                    { "noble_gas", "Any member of a group of gaseous elements in Group 0 of the periodic table; the s and p sublevels of their outermost energy levels are filled."},
                    { "nonelectrolyte", "A compound that does not conduct an electric current in aqueous solution or in the molten state."},
                    { "nonmetal", "One of a class of elements that are not lustrous and are generally poor conductors of electricity; nonmetals are grouped on the right side of the periodic table."},
                    { "nonpolar_covalent_bond", "A bond formed when the atoms in a molecule and the bonding electrons are shared equally."},
                    { "nonspontaneous_reaction", "A reaction that does not give products under the specified conditions."},
                    { "normal_boiling_point", "The boiling point of a liquid at a pressure of one atmosphere."},
                    { "normality", "(N) the concentration of a solution expressed as the number of equivalents of solute in 1 L of solution."},
                    { "nucleic_acid", "A polymer of ribonucleotides (RNA) or deoxyribonucleotides (DNA) found primarily in cell nuclei; hereditary characteristics, protein synthesis, and the control of cell activities."},
                    { "nucleotide", "One of the monomers that make up DNA and RNA; it consists of a nitrogen-containing base (a purine or pyrimidine), a sugar (ribose or deoxyribose), and a phosphate."},
                    { "nucleus", "The dense central portion of an atom, composed of protons and neutrons."},
                    { "octet_rule", "Atoms react by gaining or losing electrons so as to acquire the stable electron structure of a noble gas, usually eight valence electrons."},
                    { "ore", "A mineral used for commercial production of a metal."},
                    { "organic_chemistry", "The study of compounds that contain the element carbon."},
                    { "oxidation", "A process that involves complete or partial loss of electrons or a gain of oxygen; it results in an increase in the oxidation number of an atom."},
                    { "oxidation_number", "A positive or negative number assigned or a combined atom according to a set of arbitrary rules; generally it is the charge an atom would have if the electrons in each bond were assigned to the atoms of the more electronegative element."},
                    { "oxidation_number_change_method", "A method of balancing a redox equation by comparing the increases and decreases in oxidation numbers."},
                    { "oxidation_reduction_reaction", "A reaction that involves the transfer of electrons between reactants during a chemical change."},  
                    { "oxidizing_agent", "The substance in a redox reaction that accepts electrons, the oxidizing agent is reduced."},   
                    { "paramagnetic", "A term used to describe a substance that shows a relatively strong attraction to an external magnetic field; these substances have molecules containing one or more unpaired electrons."},
                    { "partial_pressure", "The pressure exerted by each gas in a gaseous mixture."},
                    { "pascal", "(Pa), the SI unit of pressure."},
                    { "pauli_exclusion_principle", "No more than two electrons can occupy an atomic orbital; these electrons must have opposite spins."},        
                    { "peptide", "An organic compound formed by a combination of amino acids in which the amino group of one acid is united with the caboxylic group of another through an amide bond."},
                    { "peptide_bond", "The bond between the carbonyl group of one amino acid and the nitrogen of the next amino acid in the peptide chain."},
                    { "percent_composition", "The percent bu mass of each element in a compound."},
                    { "percent_error", "1 accepted value - 1 experimental value divided by the accepted value then multiplied by 100."},
                    { "percent_yield", "The ratio of the actual yield to the theoretical yield for a chemical reaction expressed as a percentage, a measure of the efficiency of a reaction."},
                    { "period", "A horizontal row of elements in the periodic table."},
                    { "periodic_law", "When the elements are arranged in order of increasing atomic number, there is a periodic repetition of their physical and chemical properties."},
                    { "periodic_table", "An arrangement of elements into rows and columns according to similarities in their properties."},
                    { "ph", "A number used to denote the hydrogen-ion concentration, or acidity, of a solution; it is the negative logarithm of the hydrogen ion concentration of a solution."},
                    { "phase", "Any part of a system with uniform composition and properties."},
                    { "phase_diagram", "A diagram showing the conditions at which a substance exists as a solid, liquid, or vapor."},
                    { "photoelectric_effect", "A process in which electrons are ejected by certain metals when light of sufficient frequency shines on them."},
                    { "photon", "A quantum of light; a discrete bundle of electromagnetic energy that behaves as a particle."},
                    { "physical_change", "An alteration of a substance that does not affect its chemical composition."},
                    { "pi_bond", "A bond in which the bonding electrons are most likely to be found in the sausage-shaped regions above and below the nuclei of the bonded atoms."},
                    { "plancks_constant", "(h) A number used to calculate the radiant energy, E, absorbed or emitted by a body from the frequency of radiation."},
                    { "plasma", "A state of matter consisting of a gaseous mixture of electrons and positive ions."},
                    { "polar_bond", "A bond formed when two different atoms are joined by a covalent bond and the bonding electrons are shared unequally."},
                    { "polar_covalent_bond", "see polar bond."},
                    { "polar_molecule", "A molecule in which one or more atoms is slightly negative, and one or more is slightly positive in such a way that the polarities do not cancel; water is a polar molecule."},
                    { "polyatomic_ion", "A tightly bound group of atoms that behaves as a unit and carries a charge."},
                    { "polymer", "A very large molecule formed by the covalent bonding of repeating small molecules, known as monomers."},
                    { "polypeptide", "A peptide with more than 10 amino acid residues."},
                    { "polysaccharides", "A complex carbohydrate polymer formed by the linkage of many monosaccharide monomers; starch, glycogen, and cellulose are polysaccharides."},
                    { "positron", "A particle which has the same mass as an electron but has a positive charge."},
                    { "precision", "The reproducibility, under the same conditions, of a measurement."},
                    { "product", "A substance formed in a chemical reaction."},
                    { "protein", "Any peptide with more than 100 amino acid residues."},
                    { "proton", "A positively charged subatomic particle found in the nucleus of an atom."},
                    { "qualitative_measurement", "A measurement which gives descriptive, nonnumeric results."},
                    { "quantitative_measurement", "A measurement which gives definite, usually numeric results."},
                    { "quantum", "A small package, or unit, of electromagnetic energy; the amount of energy required to move an electron from its present energy level to a higher one."},
                    { "quatum_mechanical_model", "The modern description, primarily mathematical, of the behavior of electrons in atoms."},
                    { "radiation", "The penetrating rays emitted by a radioactive source; also, the giving off of energy in various forms such as heat, light, or radiowaves."},
                    { "radioactivity", "The property by which an atomic nucleus gives off alpha, beta, or gamma radiation."},
                    { "radioisotopes", "Isotopes that have unstable nuclei and undergo radioactive decay."},
                    { "rate", "A measure of change within an interval of time."},
                    { "rate_law", "An expression relating the rate of a reaction to the concentration of the reactants."},
                    { "reactant", "A starting substance in a chemical reaction."},
                    { "reaction_mechanism", "A series of elementary reactions that take place during the course of a complex reaction."},
                    { "redox_reaction", "Another name for an oxidation- reduction reaction."},
                    { "reducing_agent", "The substance in a redox reaction tat donates electrons; in the reaction, the reducing agent is oxidized."},
                    { "reduction", "A process that involves a complete or partial gain of electrons or the loss of oxygen; it results in a decrease in the oxidation number of an atom."},
                    { "reduction_potential", "A measure of the tendency of a given half-reaction to occur as a reduction (gain of electrons) in an electrochemical cell."},
                    { "representative_element", "Am element that belongs to an A group in the periodic table; they are called representative elements because they illustrate the entire range of chemical properties."},
                    { "representative_particle", "The smallest unit into which a substance can be broken down without a change in composition; the term refers to whether a substance commonly exists as atoms, ions, or molecules."},
                    { "resonance", "A phenomenon that occurs when two or more equally valid electron dot structures can be written for a molecule; the actual bonding is believed to be a hybrid or mixture of the extremes represented by the resonance forms."},                                             
                    { "reversible_reaction", "A reaction in which the conversion of reactants into products and the conversion of products into reactants occur simultaneously."},
                    { "salt_bridge", "A tube containing a conducting solution used to connect half-cells in a voltaic cell; it allows the passage of ions from one compartment to another but prevents the solutions form mixing completely."},
                    { "salt_hydrolisis", "A process in which the cations or anions of a dissociated salt hydrogen ions from water or donate hydrogen ions to water; solutions containing hydrolyzed salts may be either acidic or basic."},
                    { "saponification", "The process used to make soap; it involves the hydrolysis of fats or oils by hot aqueous sodium hydroxide."},
                    { "saturated_compound", "An organic compound in which all carbon atoms are joined by single covalent bonds; it contains the maximum number of hydrogen atoms."},
                    { "saturated_solution", "A solution containing the maximum amount of solute for a given amount of solvent at a constant temperature and pressure; in a saturated solution, the dissolved and undissolved solute are in dynamic equilibrium."},                                        
                    { "scientific_law", "A concise statement that summarizes the results of a broad variety of observations and experiments."},
                    { "scientific_notation", "Expression of numbers in the form N x 10 to the power of n where N is equal to or greater than 1 and less than 10 and n is an integer."},
                    { "scintillation_counter", "A device that uses a specially coated surface called a phosphor to detect radiation; ionizing radiation striking this surface produces bright flashes of light (scintillation)."},
                    { "self-ionization", "A term describing the reaction in which two water molecules react to give ions."},
                    { "signa_bond", "A bond formed when two atomic orbitals combine to form a molecular orbital that is symmetrical along the axis connecting the two atomic nuclei."},
                    { "significant_figures", "All the digits that can be known precisely in a measurement, plus a last estimated digit."},
                    { "single_covalent_bond", "A bond formed when a pair of electrons is shared between two atoms."},
                    { "single_replacement_reaction", "A chemical change in which atoms of an element replace atoms of a second element in a compound; also called a displacement reaction."},
                    { "skeleton_equation", "A chemical equation that does not indicate the relative amounts of reactants and products."},
                    { "slaked_line", "Calcium hydroxide."},
                    { "solid", "Matter which has a definite shape and volume."},
                    { "solubility", "The amount of a substance that dissolves in a given quantity of solvent at specified conditions of temperature and pressure to produce a saturated solution."},
                    { "solubility_product_constant", "An equilibrium constant that can be applied to the solubility of electrolytes; it is equal to the product of the concentration terms wach raised to the power of the coefficient of the substance in the dissociation equation."},
                    { "solute", "Dissolved particles in a solution."},
                    { "solution" "A homogeneous mixture."},
                    { "solvation", "A process that occurs when an ionic solute dissolves; in solution, the ions are surrounded by solvent molecules."},
                    { "solvent", "The dissolving medium in a solution."},
                    { "specific_gravity", "The ratio of the density of a substance to that of a standard substance (usually water)."},
                    { "specific_rate_constant", "A proportionally constant relating the concentrations  of reactants to the rate of the reaction."},
                    { "spectator_ion", "An ion that does not change oxidation number or composition during a reaction."},
                    { "spectrum", "The range of wavelengths  and frequencies making up light; the wavelengths and frequencies making up light; the wavelengths are separated when a beam of white light passes through a prism."},
                    { "spontaneous_reaction", "A reaction known to give the products as written in a balanced equation."},
                    { "standard_atmosphere", "(atm) A unit of pressure; it is the pressure required to support 760mm of mercury in a mercury barometer at 25 degrees celcius; this is the average atmospheric poressure at sea level."},
                    { "standard_cell_potential", "The measured cell potential when the ion concentration in the half-cells are 1.00 M, at 1 atm of pressure and 25 degrees celcius."},
                    { "standard_entropy", "The entropy of a substance in its stable state at 25 degrees celcius and 1 atm."},
                    { "standard_heat_of_formation", "The change in enthalpy (H) for a reaction in which one mole of a compound is formed from its constituent elements."},
                    { "standard_hydrogen_electrode", "An arbitrary reference electrode (half-cell) used with another electrode (half-cell) to measure the standard reduction potential of that cell; the standard reduction potential of the hydrogen electrode is assigned a value of 0.00V."},
                    { "standard_solution", "A solution of known concentration used in carrying out a titration."},
                    { "standard_temperature_and_pressure", "(STP) the conditions under which the volume of a gas is usually measured; standard temperature is 0 degrees Celcius and standard pressure is 1 atmosphere (atm)."},
                    { "stereoisomers", "An organic molecule  having the same molecular structure as another molecule, but differing in the arrangement of atoms in the space."},
                    { "stoichiometry", "That portion of chemistry dealing with numerical relationships in chemical reactions; the calculation of quantities of substances involved in chemical equations."},
                    { "strong_acid", "An acid that is completely (or almost completely) ionized in aqueous solution."},
                    { "strong_electrolyte", "A solution in which a large portion of the solute exists as ions."},
                    { "structural_formula", "A chemical formula that shows the arrangement of atoms in a molecule or a polyatomic ion; each dash between two atoms indicates a pair of shared electrons."},
                    { "structural_isomer", "A compound that has the same molecular formula as another compound but has a different molecular structure."},
                    { "sublimation", "The conversion of a solid to a gas without passing through the liquid state."},
                    { "substance", "A sample of matter having a uniform and definite composition; it can be either an element or a compound."},
                    { "substituent", "An atom or group or group of atoms that can take the place of a hydrogen atom on a parent hydrocarbon molecule."},
                    { "substitution", "The replacement of an atom or group of atoms by another atom or group of atoms."},
                    { "supersaturated_solution", "A solution that contains more solute than it can theoretically hold at a given temperature."},
                    { "surfactant", "A surface active agent; any substance whose molecules interface with the hydrogen bonding between water molecules, reducing surface tension; soaps and detergents are surfactants."},
                    { "surroundings", "The remainder of the universe that is outside of the system."},
                    { "suspension", "A mixture from which some of the particles settle out slowly upon standing."},
                    { "system", "Any part of the universe that attention is focused on."},
                    { "temperature", "The degree of hotness or coldness of an object, which is a measure of the average kinetic energy of the molecules of the object."},
                    { "ternary_compound", "A compound containing atoms of three different elements with one or more polyatomic ions usually present."},
                    { "tetrahedral_angle", "A bond angle of 109.5 degrees created when a central atom forms four bonds directed toward the concerns of a regular tetrahedron."},
                    { "theoretical_yield", "The amount of product that could form during a reaction calculated from a balanced chemical equation; it represents the maximum amount of product that could be formed from a given amount of reactant."},
                    { "theory", "A thoroughly tested model that explains why experiments give certain results."},
                    { "thermochemical_equation", "A chemical equation that includes the amount of heat produced or absorbed during the reaction."},
                    { "thermochemistry", "The study of heat changes in chemical reactions."},
                    { "titration", "A method of reacting a solution of unknown concentration with one of known concentration; this procedure is often used to determine the concentrations of acids and bases."},
                    { "trans_configuration", "A term applied to geometric isomers; it denotes an arrangement in which the substituted groups are on opposite sides of the double bond."},
                    { "transition_metal", "An element found in one of the B groups in the periodic table."},
                    { "transition_state", "A term sometimes used to refer to the activated complex."},
                    { "transmutation", "The conversion of an atom of one element into an atom of another element by the emission of radiation."},
                    { "transuranium_element", "An element in the periodic table whose atomic number is above 92."},
                    { "triglyceride", "An ester in which all three hydroxyl groups on a glycogen molecule have been replaced by a long-chain fatty acids; fats are triglycerides."},
                    { "triple_covalent_bond", "A covalent bond in which three pairs of electrons are shared by two atoms."},
                    { "triple_point", "The point on a phase diagram where all three states of a substance are present."},
                    { "tripotic_acid", "The point on a phase diagram where all three states of a substance are present."},
                    { "tyndall_effect", "The visible path produced by a beam of light passing through a colloidal dispersion or suspension; the phenomenon is caused by the scattering of light by the colloidal and suspended particles."},
                    { "unit_cell", "The smallest group of particles within a crystal that retains the geometric shape of the crystal."},
                    { "universe", "The totality of all existing things."},
                    { "unsaturated", "A solution that contains less solute than a saturated solution at a given temperature and pressure."},
                    { "unsaturated_compound", "An organic compound with one or more double or triple carbon-carbon bonds."},
                    { "unshared_pair", "A pair of valence electrons that is not involved in bonding."},
                    { "vacuum", "A space where no particles of matter exist."},
                    { "valence_electron", "An electron in the highest occupied energy level of an atom."},
                    { "van_der_waals_force", "A term used to describe the weakest intermolecular attractions; these include dispersion forces and dipole interaction."},
                    { "vapor", "A substance in the gaseous state that is ordinarily (at room temperature) a liquid or solid."},
                    { "vapor_pressure", "The pressure produced when vaporized particles above the liquid in a sealed container collide with the container walls; when the container is saturated with vapor, a dynamic equilibrium exists between the gas and the liquid."},
                    { "vaporization", "The conversion of a liquid to a gas at a temperature below its boiling point"},
                    { "voltaic_cell", "An electrochemical cell used to convert chemical energy into electrical energy; the energy is produced by a spontaneous redox reaction."},
                    { "volume", "The space occupied by matter."},
                    { "vsepr_theory", "Valence-shell electron-pair repulsion theory; because electron pairs repel, molecules adjust their shapes so that valence-electron pairs are as far apart as possible."},
                    { "water_of_hydration", "Water molecules that are an integral part of a cyrstal structure."},
                    { "wavelength", "The distance between two adjacent crests of a wave."},
                    { "wax", "an ester of a long-chain fatty acid and a long-chain alcohol."},
                    { "weak_acid", "An acid that is only slightly ionized in aqueous solution."},
                    { "weak_base", "A base that does not dissociate completely in aqueous solution."},
                    { "weak_electrolyte", "A solution in which only a fraction of the solute exists as ions."},
                    { "weight", "A measure of the force of attraction between the earth and an object."},
                    { "zwitterion", "An internal salt of an amino acid."} };
                    int entries = 600;
                    char word[600];
                    int entry; 
                    int lookup (const struct entry dictionary[], const char search[], const int entries);
                    
                    printf ("Enter desired term, please use underscores as spaces and refrain from using apostrophes:\n"); 
                    scanf("%14c", word);
                    
                    entry = lookup (dictionary, word, entries);
                    
                    if (entry != -1)
                       printf ("%c\n", dictionary[entry].definition);
                    else
                        printf("Sorry, term could not be found");
                        getchar();
                        getchar();
                        return 0;
                        }

  2. #2
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    the problem is that you are not reading in a string using scanf - i've never seen that call sequence to scanf

    scanf("%14c", word);
    my guess from this is that you want to read in 14 characters - thats not how you do it!

    scanf isn't the best function to use in the first place, a better function is fgets, and there is a good tutorial on using it. also, it will allow you to enter in spaces, which is good. try this link


    http://faq.cprogramming.com/cgi-bin/...&id=1043284385

    also note that this goes into detail regarding this 'newline' character, to use fgets properly you have to use some code to replace this newline character with the string terminator character '\0' - the tutorial should be detailed enough for you to follow.

    if you want to leave your code as is, scanf can be used to read in strings as follows:

    Code:
    scanf ("%s", word);
    that is probably the main problem with your program, otherwis looks ok, but i didn't read through your search algorithm since you said that you did have it working

  3. #3
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,005
    Quote Originally Posted by Richie T
    if you want to leave your code as is, scanf can be used to read in strings as follows:

    Code:
    scanf ("%s", word);
    That has the same issue as gets, and should be avoided for the same reason.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    1. Your indentation sucks
    2. You really didn't need to include all 600 entries just to make your point.
    3. Why aren't you using standard functions strcmp() and bsearch()?
    4. If you want to save a bunch of space, then do
    Code:
    struct entry
    {
                *char word;
                *char definition;
    };

  5. #5
    The Richness... Richie T's Avatar
    Join Date
    Jan 2006
    Location
    Ireland
    Posts
    469
    one more thing, when you are printing out the result of a search (ie when the search succeeds) you must use %s instead of %c. that %c only prints one character, the first character of your result.

    change

    Code:
    printf ("%c\n", dictionary[entry].definition);
    to this

    Code:
    printf ("%s\n", dictionary[entry].definition);
    also, your search algorithm isn't that great - it fails on "amplitude", and as a result, possibly on other items too. a linear search using strcmp would suit you for this application - you're not making a database for the pentagon!

    hope this helps
    No No's:
    fflush (stdin); gets (); void main ();


    Goodies:
    Example of fgets (); The FAQ, C/C++ Reference


    My Gear:
    OS - Windows XP
    IDE - MS Visual C++ 2008 Express Edition


    ASCII stupid question, get a stupid ANSI

Popular pages Recent additions subscribe to a feed