Which one of the following is a self-replicating program that eats up

Which one of the following is a self-replicating program that eats up the entire disk space as memory?

Worm
Trojan Horse
Ransomware
Spyware
This question was previously asked in
UPSC CBI DSP LDCE – 2023
The correct answer is A) Worm.
A worm is a standalone malware program that replicates itself to spread to other computers. Unlike viruses, worms do not need to attach themselves to an existing program. They can consume significant system resources, including disk space and memory, as they self-replicate and spread.
A Trojan Horse is a malicious program disguised as legitimate software, but it does not self-replicate. Ransomware encrypts data and demands payment for its release. Spyware collects information about the user’s activities without their knowledge. The description of a self-replicating program that consumes disk space aligns best with the characteristics of a worm.