  We discuss the synchrotron emission of fast cooling electrons in shocks. The
fast cooling electrons behind the shocks can generate a position-dependent
inhomogeneous electron distribution if they do not have enough time to mix
homogeneously. This would lead to a very different synchrotron spectrum in
low-frequency bands to that in the homogeneous case due to the synchrotron
absorption. In this paper, we calculate the synchrotron spectrum in the
inhomogeneous case in a gamma-ray burst (GRB). Both the forward shock and the
reverse shock are considered. We find for the reverse shock dominated case, we
would expect a "reverse shock bump" in the low-frequency spectrum. The spectral
bump is due to the combination synchrotron absorption in both the forward and
reverse shock regions. In the forward shock spectrum in the low frequencies has
two unconventional segments with spectral slopes of $\lesssim1$ and $11/8$. The
slope of $11/8$ has been found by some authors, while the slope of $\lesssim1$
is new, which is due to the approximately constant electron temperature in the
optically thick region. In the future, simultaneous observations in multiple
bands (especially in the low frequency bands) in the GRB early afterglow or
prompt emission phases will possibly reveal these spectral characteristics and
enable us to identify the reverse shock component and distinguish between the
forward and reverse shock emissions. This also may be a method with which to
diagnose the electron distribution status (homogeneous or inhomogeneous) after
fast cooling in the relativistic shock region.
