Considering their remarkable chemical stability, the precursors of cyclo[18]carbon (C18), C18-(CO)n (n = 2, 4, and 6), have more practical significance than the elusive C18 ring. In the present paper, the electronic spectrum and (hyper)polarizability of the C18-(CO)n (n = 2, 4, and 6) are studied by theoretical calculations and analyses for revealing the utility of introduction of carbonyl (-CO) groups on molecular optical properties. The analysis results show that the successive introduction of -CO groups leads to red-shift of the absorption spectrum, but maximum absorption of all molecules is mainly due to the charge redistribution caused by electron transition within C18 ring. Except for the vanishing first hyperpolarizability of C18-(CO)6 results from its octupolar character, the (hyper)polarizabilities of the precursors present an ascending trend with the increase of -CO groups in the molecule, and the higher-order response properties are more sensitive to the number of -CO groups. By means of (hyper)polarizability density analysis and (hyper)polarizability contribution decomposition, the fundamental reasons for the difference of (hyper)polarizability of different molecules were systematically discussed from the perspectives of physical and structural origins, respectively. As to the frequency dispersions under the incident light, the significant optical resonances were found on the hyperpolarizability of molecules C18-(CO)n (n = 2, 4, and 6), which contrast with the fact that it has inconspicuous influences on molecular polarizability.