C8H18 is a compound
A compound is a substance formed when two or more chemical elements are chemically bonded together. Two types of chemical bonds common in compounds are covalent bonds and ionic bonds. The elements in any compound are always present in fixed ratios.
This compound is formed by combination of Carbon and hydrogen via covalent bonds. In case of C8H18 (n-octane) 8 carbon is attached to 18 Hydrogen. (C-C) and (C-H)