hw1 - } else if(count is 1000) { file = random-executable;...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CIS 3360 Homework 1 Due Date: August 30 Worth: 3% Q1 : In the following program, a pseudo code is given. Give a trace of the program and explain what happens at each step. Explain what this program does. (15 points) Program V:= { 1234567; Subroutine infect-executable:= { loop: file = random-executable; // select a random executable file if (first line of file = 1234567) then goto loop; else prepend V to file; } Sub-routine display-message:= { count = 1000; do while(count is not equal to 0) { if (count is 0) then exit from sub-routine display-message; else if(count is between 1 to 997) { file = random-executable; execute simultaneously as many occurrences of the file as the value of count; } else if(count is 998 or 999) { file = random-executable; delete ith line of file such that i = count;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: } else if(count is 1000) { file = random-executable; change every occurrence of the character s with the character a; } count = count -1; } } Subroutine trigger-pulled:= { if (time is between 10pm to 11pm) then set trigger-pulled to true; else set trigger-pulled = false; } Main-program-of-virus:= { infect-executable; if (trigger-pulled) then display-message; goto next; } next: } Q2 : Mention names of five viruses. Describe when they were discovered? Who discovered them? What are they named after? Briefly explain their working and damage. You are free to consult internet or any other reference. Do not copy-paste. Write in your own words. (15 points)...
View Full Document

This note was uploaded on 07/04/2011 for the course CIS 3360 taught by Professor Guha during the Fall '06 term at University of Central Florida.

Page1 / 2

hw1 - } else if(count is 1000) { file = random-executable;...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online