Fungi and viruses are heterotrophs.
The condition to distinguish heterotrophic from autotrophic is whether the external inorganic matter can make organic matter for itself during assimilation. All viruses are heterotrophic while bacteria are autotrophic, such as cyanobacteria (photoautotrophic) and nitrifying bacteria (chemoautotrophic), but most of them are heterotrophic.