What happens when a computer virus infects a file?

Prepare for the SQA National 5 Computing Science Exam with interactive quizzes, multiple choice questions, and detailed explanations. Enhance your understanding and build confidence to excel in your exam today!

When a computer virus infects a file, it can indeed delete or modify that file. This happens because the virus alters the original data contained in the file, either by corrupting it or by altering its contents to include malicious code. In some cases, a virus may also erase the entire file, leading to data loss. This behavior is a hallmark of many types of computer viruses, which are designed to compromise or disrupt file integrity and system functionality.

The other options do not accurately reflect the typical actions performed by a virus. For example, while some infected files may end up larger due to the addition of malicious code, the primary concern is the alteration of their intended use—hence the emphasis on deletion or modification. Improving file security and compressing the file are not actions associated with viruses; rather, they are desirable features in file management that help maintain data integrity and efficiency, contrasting sharply with the destructive nature of a virus.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy