  Due to their wide wavelength coverage across the millimetre to centimetre (mm
- cm) range and their increased sensitivity, modern interferometric arrays
facilitate observations of the thermal and non-thermal emission from different
stellar atmospheric layers. We study the spectral energy distribution
($S_{obs}(\nu)$) of main sequence stars using archival mm - cm data with the
aim to study their atmospheric stratification as a function of stellar type.
The main-sequence stars with significant detection in mm bands were identified
in the ALMA Science Archive. These data were complemented with spectral flux
data in the Ultra violet to centimetre range as compiled from various
catalogues and observatory archives. We compare the resultant $S_{obs}(\nu)$ of
each star with a photospheric emission model ($S_{mod}(\nu)$) calculated with
the PHOENIX code. The departures of $S_{obs}(\nu)$ from the model are
quantified in terms of a "spectral flux excess" parameter ($\Delta S/S_{mod}
(\nu)$) for every star in the sample. The initial sample consists of 12 stars
across a range of spectral type from A1 to M3.5 and the Sun-as-a-star as
reference. The stars with $T_{eff} = 4000 - 7000\,K$ (F - M type) showed a
systematically higher $\Delta S/S_{mod}$ in the mm - cm range, with the values
rising with decreasing $\nu$. The steepness of this rise is higher for cooler
stars, though the fully convective 3000 K star in the sample deviated from this
trend. For the A-type stars, $\Delta S/S_{mod} \sim 0$ within errors. The high
$\Delta S/S_{mod}$ in cool stars points to the presence of hotter upper
atmospheric layers, i.e. a chromosphere and corona, like for the Sun. The mm -
cm $\Delta S/S_{mod}$ spectrum offers a way to estimate the efficiency of the
heating mechanisms across various atmospheric layers and thereby to understand
their structure and activity. We emphasise the need for more mm - cm data.
