Professional Documents
Culture Documents
Don't Panic!: CSC 105 A01 Midterm 2
Don't Panic!: CSC 105 A01 Midterm 2
Don't Panic!: CSC 105 A01 Midterm 2
Name:_____________________________
Student Number:_______________________
Write your name and student number in the spaces provided above.
This is a closed book exam. No notes or written material of any kind are allowed. No
calculators allowed.
This exam has 15 pages, including this information page. You may write anywhere on
this booklet.
This exam consists of 35 multiple choice questions worth 1 mark each. Please mark
your answers on the Mark Sense form. You may use a pen or pencil.
AT THE END OF THE EXAM TURN IN THE MARK SENSE FORM ONLY
Don’t Panic!
Page 1
CSC105 A01 Instructor: Rich Little
1. Disk drives that use laser beams instead of magnets to read and write are called _________
A) Hard drives
B) CD/DVD-RW drives
C) CD/DVD-ROM drives
D) solid state drives
E) flash drives
2. A correct webpage has a ___________ section which contains a ________ section first, followed by a
___________ section.
A) HTML, BODY, HEAD
B) HTML, HEAD, BODY
C) BODY, HTML, HEAD
D) BODY, HEAD, HTML
E) HEAD, HTML, BODY
5. The look and feel of software, from a human point of view, is called the ___________.
A) translator
B) user interface
C) compiler
D) application program
E) none of the above
Page 2
CSC105 A01 Instructor: Rich Little
7. Which of the following statements is FALSE about JPG compression?
A) It was invented by the Joint Photographic Experts Group.
B) It is Lossy.
C) It is Lossless.
D) It works very well with photos.
E) None of the above
11. Software that stores individual pixels rather than lines and shapes is known as:
A) vector graphics software.
B) bitmap graphics software.
C) photo database software.
D) resolution software.
E) CAM software.
12. Order the following storage devices by speed, from slowest to fastest – hard disk (or hard drive), RAM,
CD-ROM.
A) CD-ROM, RAM, Hard disk
B) Hard disk, CD-ROM, RAM
C) RAM, hard disk, CD-ROM
D) RAM, CD-ROM, hard disk
E) CD-ROM, hard disk, RAM
A)
B)
C)
D)
Page 4
CSC105 A01 Instructor: Rich Little
15.You're a technical advisor for a company and your boss comes to you one day to inquire about purchasing
new hardware for the office. The office needs to be able to store various documents that are created on a
day-to-day business for future reference. You are asked which upgrade would be most appropriate:
A) Buying more RAM for the office computers
B) Buying a larger hard drive for the office computers
C) Buying new CPU's for the office computers
D) Buying new monitors for the office computers
E) Buying a Toronto Maple Leafs flag and hanging it over the office computers.
19. To place an image on the right side of the window with the text filling the area to the left of the image, the
tag would need to look like
A) <img src = “mountains.jpg” style = “float: right”>
B) <img src align = “mountains.jpg” “right”>
C) <img “mountains.jpg” src align = “right”>
D) <img = “mountains.jpg” align src = “float: right”>
E) All of the above will work
20.Which of the following HTML tags does not have a closing tag?
A) <P>
B) <UL>
C) <BR>
D) <I>
E) <B>
Page 5
CSC105 A01 Instructor: Rich Little
21.Once a web page is created, it must be uploaded to ________ to be seen on the WWW.
A) a File Server
B) an E-mail Server
C) a Web Server
D) a Printer Server
E) Connex
Au_Comments T B_Comment T
Au_ID FK #
Au_Rank and B_Rank are numbers from 1 to 10, 10 being higher (better) in rank than 1.
22. What is the list of combinations from the Books and Authors tables where
both the writer and the book are rated 9? The query should return only the author’s name and the book title.
Page 6
CSC105 A01 Instructor: Rich Little
23. Still referring to the Entity-Relationship diagram above, what query does the following select statement
answer?
SELECT Title
FROM Books
WHERE (((B_Rank)>=9))
24.You are interviewing for a job in a transportation rental agency. You are shown the following database
query statement:
SELECT Vehicle_Type
FROM All_Rental_Vehicles
WHERE (Transport_Mode = ‘Land’ OR ‘Air’ OR ‘Water’) AND Rental_Price < 25.00
The interviewer says: “You can’t use this type of technical language with the clients. How would you
change this into language that the clients would understand?” You want the job so you reply:
A) This statement will search the database for all types of rental vehicles that can go on land, or air, or
water and cost $25.00 or less to rent.
B) This statement will search the database for all types of rental vehicles that can go on land, and air, and
water and cost $25.00 or less to rent.
C) This statement will search the database for all types of rental vehicles that can go on land, or air, or
water and cost less than $25.00 to rent.
D) This statement will search the database for all types of rental vehicles that can go on land, and air, and
water and cost less than $25.00 to rent.
E) This statement searches the database and tells the clients that a private Lear Jet is the transportation
mode for them.
25.The HTML tag <BODY bgcolor = “#0000FF”> sets the background colour to which colour?
A) Red
B) Green
C) Blue
D) White
E) It is not a valid tag
26. Which one of the following CSS entries does not force the <NAV> element to start on a newline?
A) nav {display: block;}
B) nav {display: right;}
C) nav {display: current;}
D) nav {display: inline;}
E) none of the above
Page 7
CSC105 A01 Instructor: Rich Little
Consider the following diagram for question 27.
2
.
3
.
27. The diagram represents a portion of the execution of a running program. The top of the diagram represents
actions in the CPU, and the bottom represents actions in RAM. What is happening at each of the numbered
components of the diagram?
A) 1. is incrementing the program counter
2. is fetching instructions from RAM into the CPU
3. is performing the task specified in 1 (in this case putting 99 into register A).
D) 1 is performing the task specified in 1 (in this case putting 99 into register A).
2. is incrementing the program counter.
3. is fetching instructions from RAM into the CPU
E) 1 is performing the task specified in 1 (in this case putting 99 into register A).
2. is fetching instructions from RAM into the CPU
3. is incrementing the program counter.
Page 8
CSC105 A01 Instructor: Rich Little
Consider the following JavaScript for Questions 28 and 29. Assume that it is correctly placed in an HTML
document.
30.Shown below is a screenshot of an HTML document. The underlined text is a link to the page:
http://www.csc.uvic.ca/~csc105. Which HTML code will produce this page: (your five options are on the
next page.)
Page 9
CSC105 A01 Instructor: Rich Little
A) <HTML>
<HEAD><TITLE>CSC 105 is almost over</TITLE></HEAD>
<BODY>
<p>In <a href=“http://www.csc.uvic.ca/~csc105”>CSC 105</a> you learned:
<OL>
<li>A little about computer hardware</li>
<li>Some HTML and Javascript</li>
<li>How Hackers is a horrible movie</li>
</OL>
</BODY>
</HTML>
B) <HTML>
<HEAD><TITLE>CSC 105 is almost over</TITLE></HEAD>
<BODY>
<p>In <a href=“http://www.csc.uvic.ca/~csc105” src=”CSC 105”> you learned:
<UL>
<li>A little about computer hardware</li>
<li>Some HTML and Javascript</li>
<li>How Hackers is a horrible movie</li>
</UL>
</BODY>
</HTML>
C) <HTML>
<HEAD><TITLE>CSC 105 is almost over</TITLE></HEAD>
<BODY>
<p>In <a href=“http://www.csc.uvic.ca/~csc105” src=”CSC 105”> you learned:
<LIST>
<li>A little about computer hardware</li>
<li>Some HTML and Javascript</li>
<li>How Hackers is a horrible movie</li>
</LIST>
</BODY>
</HTML>
D) <HTML>
<HEAD>CSC 105 is almost over</HEAD>
<BODY>
<p>In <a href=“http://www.csc.uvic.ca/~csc105”>CSC 105</a> you learned:
<UL>
<li>A little about computer hardware</li>
<li>Some HTML and Javascript</li>
<li>How Hackers is a horrible movie</li>
</UL>
</BODY>
</HTML>
Found in the HEAD section of the index.html file is the following tag for linking to a CSS.
The styles are not working, how can you fix it?
<INPUT TYPE = "button" VALUE = "Click Here" onclick="alert(‘You clicked me!’) ">
A) It will create a text box with Click Here entered. When the user clicks the mouse, an alert box appears
with the “You clicked me!” message.
B) It will create a button titled Click Here. When the button is clicked, an alert box will appear showing the
“You clicked me!” message.
C) It will create a checkbox called Click Here. When the checkbox is clicked, an alert box will appear
showing the “You clicked me!” message.
D) It will create a method called Click Here. When the method is clicked, an alert box will appear showing
the “You clicked me!” message.
E) It will create a prompt with Click Here entered. When the user clicks the mouse, an alert box appears
with the “You clicked me!” message.
Page 11
CSC105 A01 Instructor: Rich Little
34. Imagine that the following cascading style sheet information is correctly entered in a .css file:
body{
width: 95%;
font-family: Arial, "MS Trebuchet", sans-serif;
text-align: center;
background-color:#000000;
}
h1{color: #ff00ff}
header{
width: 75%;
margin: 15px auto;
border: 2px solid #0000ff;
}
Furthermore, imagine that the .css file is correctly referenced in an HTML file. The HTML file contains the
following content in the BODY (all of the other tags - e.g. HTML open and close - are correctly placed) :
......
<body>
<header>
<h1> Hello World!! Welcome to HTML 5 </h1>
</header>
</body>
.......
What would the web page look like in the browser? Choose the best answer of the choices on the next two
pages. (NOTE: In each of the options the text of the heading is magenta and the border of the header is blue)
Page 12
CSC105 A01 Instructor: Rich Little
A)
B)
Page 13
CSC105 A01 Instructor: Rich Little
C)
D)
Page 14
CSC105 A01 Instructor: Rich Little
35.Which of the following is a confirm dialog box in JavaScript? Note, the overall style of the dialog box is
determined by the browser that generates it but the main features do not change.
A)
B)
C)
-- END OF EXAM –
Page 15