A computer virus is a small programme written to change the way a computer works without the user’s knowledge or consent.A virus must meet two criteria:
1. It must execute itself. It often places its own code in the
execution path of another programme.
2. It must propagate itself.
For example, it can replace other executables with a copy of a file infected with the virus. Viruses can infect desktop computers as well as network servers. Some viruses are programmed to damage the computer by corrupting programmes, deleting files or reformatting the hard disk. Other viruses are not designed to cause damage, but only to multiply themselves and make their presence known through text, video or audio messages. Even these benign viruses can cause problems for computer users. They usually take up computer memory that ordinary programmes use. As a result, computers become unstable and the system may crash. Also, viruses often contain bugs themselves, which in turn lead to system crashes and data loss.