CS 16 – Test #2 – March 27, 2009 – Name ____________________________________

 

1.    The most basic and fundamental piece of software on a computer is the _______.

a.    graphical user interface

b.    screen

c.    CPU

d.    word processor

e.    text editor

f.     operating system

 

2.     Which of the following parts of a database is typically required?

a.    filter

b.    form

c.    query

d.    relationship

e.    report

f.     table

3.    When designing a Web page, a “heading 1” format is most likely to appear _______.

a.    at the top of a page

b.    at the bottom of a page

c.    as a link

d.    as a caption to an image

e.    inside a jump menu

f.     in a hotspot

4.    Jump menus differ from navigation bars in that a jump menu _______.

a.    can be modified or edited after creation

b.    consists of rollover images

c.    is considered an interactive image

d.    highlights text when the cursor is over a menu selection

e.    can arrange links vertically

f.     none of the above

5.    Which is/are true about Dreamweaver?

a.    Images included in a page must be kept in a folder called images.

b.    Web pages can be previewed in a browser without quitting Dreamweaver first.

c.    Images can be resized on a page out of their original proportions.

d.    two of the above

e.    all of the above

f.     none of the above

 

6.    Holding down on the shift key while hitting return will have what effect on a Web page being edited in Dreamweaver?

a.    The cursor will go back to the beginning of the present line.

b.    The cursor will go to the beginning of the next line.

c.    A new paragraph will begin.

d.    The cursor will go to the beginning of the previous line.

e.    The right margin will be extended to allow more typing on the present line.

f.     All text on the current line becomes capitalized.

 

7.    In an HTML file, text enclosed between <b> and </b> is _______.

a.    in a big font

b.    in a bold font

c.    the name of a browser

d.    a bullet

e.    colored blue

f.     a binary number

 

 

8.    Web browsers first appeared in the decade of the _______.

a.    1940s

b.    1950s

c.    1960s

d.    1970s

e.    1980s

f.     1990s

9.    In Dreamweaver, layers differ from frames in that layers _______.

a.    can have scroll bars

b.    can be resized

c.    can be overlapped

d.    two of the above

e.    all of the above

f.     none of the above

 

10. In Excel, which of the following is not an input to the Goal Seek command?

a.    the cell containing the end result

b.    the desired value of the end result

c.    the cell whose value will change to reach the end result

d.    the value of the input cell that is required to reach the end result

 

11. Suppose you want to purchase a new car and you know by using the PMT function that your monthly payments will be $400, which you cannot afford.  If you want to budget a $300 monthly payment, which of the following should you use to determine the appropriate principal amount or interest rate to borrow?

a.    VLOOKUP

b.    Goal Seek

c.    FV

d.    Scenario Manager

e.    Function Wizard

f.     none of the above

 

12. If you use a search engine and enter the search phrase egpyt –egypt, what Web pages will be retrieved?

a.    pages in which the word Egypt is always misspelled

b.    pages in which the word Egypt appears uncapitalized

c.    pages containing the word Egypt, either capitalized or not

d.    pages containing the word Egypt, either spelled correctly or not

e.    pages that have nothing to do with Egypt

f.     pages in which the word Egypt appears in the title

13. Consider the URL http://abc.xyz.edu/physics/astro/index.html.  The part “abc” is the name of the _______.

a.    browser

b.    protocol

c.    university

d.    folder

e.    Web page

f.     server

 

14. How would the font of this test be described?

a.    sans-sarif and proportional

b.    non-sans-sarif and proportional

c.    sans-sarif and not proportional

d.    non-sans-sarif and not proportional

 

 

15. Suppose that a spell checker uses a binary search to determine if words are misspelled.  If the spell checker’s dictionary has 8000 words, approximately how many guesses are needed to determine if a word exists in the dictionary?

a.    4

b.    13

c.    33

d.    560

e.    800

f.     4000

 

 

16. Which of the following is/are true about text formatters?

a.    They have been around for over 30 years.

b.    Typesetting is accomplished by inserting commands directly into the text of the document itself.

c.    The postscript file that results can be deleted without losing the formatting information.

d.    two of the above

e.    all of the above

f.     none of the above

 

 

17. One typewritten page of plain text would require about how much memory?

a.    100 bytes

b.    400 bytes

c.    1KB

d.    4KB

e.    10KB

f.     1MB

 

18. In Access, the rows of a table correspond to _______.

a.    fields

b.    records

c.    reports

d.    files

e.    forms

f.     queries

19. In Access, the columns of a table correspond to _______.

a.    fields

b.    records

c.    reports

d.    files

e.    forms

f.     queries

 

 

20. Which of the following is used to answer a question about a database?

a.    relationship

b.    form

c.    query

d.    wizard

e.    report

f.     record

 

 

21. How many 8-character passwords are there if each character may be an upper or lowercase letter or digit?

a.    28

b.        216

c.    264

d.        628

e.    6216

f.     6264

 

 

22. Word processing differs from text formatting in that a word processor:

a.    lets you immediately see the effect of formatting or layout without waiting for the entire document to be translated

b.    allows you to specify different fonts, font sizes, boldface and italic styles

c.    is more difficult for beginners to learn how to use

d.    two of the above

e.    all of the above

f.     none of the above

 

 

23. In Excel, the mid function allows you to print the “middle” of a text string, and it takes 3 parameters:  a cell reference, a beginning character number, and the number of characters to return.  The search function returns the position of a character, and its 2 parameters are what text to search for, and the cell reference.  If the cell B2 contains the text (without the quotes):  “Greenville County, South Carolina”, and we type in the formula =mid(b2,search(“,”,b2), 5)  into cell B3, what would be the result?

a.    South

b.    , Sou

c.    South Carolina

d.    , South Carolina

e.    ounty

f.     Green

 

 

 

24. Which of the following is not a responsibility of the operating system?

a.    managing I/O devices

b.    password checking

c.    managing what belongs in RAM versus disk

d.    user interface

e.    scheduling processes in the CPU

f.     decoding instructions that have been fetched

 

 

25. Font sizes are measured in points.  How big is a point, in inches?

a.    1/6

b.    1/10

c.    1/12

d.    1/72

e.    1/100

f.     none of the above

 

26. A Web server is _______.

a.    someone who searches for documents on the Web

b.    a computer program that interprets HTML files and displays them on the screen

c.    a person or organization that creates and maintains content on a Web site

d.    a single hypertext document

e.    a set of Web pages that are linked together and reside on the same computer

f.     none of the above

 

27. When someone is designing software, what step should take place after the algorithm has been discovered?

a.    compile the program to check for errors

b.    pipeline the operations to make the program run faster

c.    write the program in a programming language

d.    run the program to make sure it gives the correct output

e.    fetch the next instruction from memory

f.     save the program to disk

 

28. In an HTML file, the tags <p> and </p> are used for what?

a.    inserting pictures

b.    links to another page

c.    changing text font size

d.    paragraphs

e.    marking the title of the page

f.     frames

29. What is the appropriate HTML tag for introducing a set of bullets into a Web page?

a.    <a>

b.    <b>

c.    <br>

d.    <ol>

e.    <sup>

f.     <ul>

 

30. Each time you start Dreamweaver to make modifications to a Web site, you must first tell Dreamweaver:

a.    how many .html files are in the site

b.    where the images are to be stored

c.    the name of the folder that contains the site

d.    whether your filenames will have the extension .htm or .html

e.    whether you intend to use frames to divide the content on pages

f.     what text should appear in the title bar of the Web page

 

31. The filename extension for a hypertext document is most likely which of the following?

a.    .dat

b.    .txt

c.    .html

d.    .hyp

e.    .doc

f.     .ppt

32. In Dreamweaver, what do we call a portion of an image that is used as a link to another page?

a.    navigation bar

b.    hotspot

c.    asset

d.    layer

e.    jump point

f.     none of the above

 

33. In Access, the purpose of a _______ is to enter (or input) data about one record.

a.    form

b.    query

c.    report

d.    relationship

e.    table

f.     none of the above



34. Which of the following is true about creating text documents with a word processor?

a.    Formatting commands are entered directly into the text of the document.

b.    It is WYSIWYG.

c.    Unlike text formatters, they are free.

d.    Unlike text formatters, you can delete the output file to save space without losing information.

e.    more than one of the above statements is true

f.     none of the above is true

35. What do we call software that translates code written in a high-level programming language into machine code?

a.    operating system

b.    editor

c.    algorithm

d.    compiler

e.    decoder

f.     register

36. What is the value of the variable sum after the following code executes?

sum = 0;
number = 1;
while (number <= 10)
{
    sum = sum + number;
    number = number + 3;
}

a.    12

b.    13

c.    22

d.    35

e.    55

f.     none of the above

 

 

37.  Which of the following types of text software operates most like a compiler?

a.    text editor

b.    text formatter

c.    web browser

d.    word processor

 

38. A program (executable file) that is created to run on an IBM PC will not run on an Apple Macintosh mainly because the Macintosh:

a.    does not have as much memory

b.    has a different hard disk configuration

c.    does not use ASCII code to represent characters

d.    uses a different machine language

e.    uses a different keyboard and mouse

f.     none of the above

 

39. Suppose a binary search strategy is used to guess a certain number between 0 and 100.  The guesses include the values 50, 56, 58, 59, 62, and 75, though not necessarily this order.  Which value is the correct answer?

a.    50

b.    56

c.    58

d.    59

e.    62

f.     75

40. There is a feature of Excel that allows you to determine values of multiple input cells necessary to achieve a particular value for an output cell.  What is this feature called?

a.    conditional formatting

b.    goal seek

c.    pivot table

d.    scenario manager

e.    solver

f.     trace dependents

 

41. Consider the following algorithm.

list[0] = 2; list[1] = 3; list[2] = 0; list[3] = 4; list[4] = 1;

target = 3

for count = 0 to 4 do:

                   if (target is equal to list[count])

                             location = count

                   count = count + 1

What is the value of the variable “location” when this algorithm is finished?

a.    0

b.    1

c.    2

d.    3

e.    4

f.     5

 

42. Which sort of programming language features instructions with very short names (typically 3 letters long), and operands that are the names of registers?

a.    assembly

b.    binary

c.    high-level

d.    job control

e.    machine

f.     von Neumann

 

43. Suppose a computer program contains an instruction to open a file for reading.  However, this file does not exist.  What sort of error does this represent?

a.    Logical error

b.    Run-time error

c.    Syntax error

 

 

44. Suppose you just finished typing in a computer program.  But one of the lines that reads “if x > 0” should instead be “if x < 0”, because you had meant to look for a negative number.  What type of error is this?

a.    Logical error

b.    Run-time error

c.    Syntax error

 

 

 

45. Suppose we have a list of numbers that we wish to sort in descending order.  First, we find the largest number in the list, and swap it into the first position.  Then, we find the 2nd largest number, and swap it into the second position.  We continue doing this (swapping the i-th largest element into the i-th position) until the entire array is sorted.  What is this sorting method called?

a.    Bubble sort

b.    Insertion sort

c.    Merge sort

d.    Selection sort

 

46. The following algorithm attempts to solve the following problem.  We have a list of 10 playing cards, and we want to count how many are face cards (jack/queen/king), and print out this number.  But there is one mistake.  What is it?  Assume that the cards have already been initialized in the list.

 

(1)  facecard = 0

(2)  for count = 0 to 9

(3)       if (list[count] is jack, queen or king)

(4)            facecard = facecard + 1

(5)       count = count + 1

(6)  print the value of count

 

a.    On line 1, facecard should be set to 1 instead of 0.

b.    On line 2, the “9” should be changed to “10”.

c.    On line 2, the “0” should be changed to “1”.

d.    Lines 4 and 5 should be reversed.

e.    On line 6, “count” should be replaced with “facecard”.

f.     On line 6, the statement should appear inside the loop, not after it.

 

 

 

 

47.  Suppose an operating system uses Shortest Job Next to schedule tasks on the CPU.  Five tasks need to execute, and their data is given in the following table.

 

Task number

Time when requested

Execution time

#1

0

50

#2

10

40

#3

20

30

#4

30

20

#5

40

10

 

What is the turnaround time for task #3?

a.    40

b.    90

c.    100

d.    110

e.    120

f.     None of the above



 

 

 

 

 

 

 

 

 

 

 

48. Suppose we are writing a Javascript program in a Web page to determine the time in a city whose time zone is 2 hours behind us, e.g. Denver, Colorado.

 

(1)var d = new Date();

(2)var hour = d.getHours();

(3)var min = d.getMinutes();

(4)var denverHour = hour – 2;

(5) 

(6)document.write(“Denver’s time is “);

(7)document.write(denverHour);

(8)document.write(“:”);

(9)document.write(min);

(10) document.write(“<br>”);

 

We need to insert an if-statement in this code to check to make sure we don’t output a negative number for the hours.  We should insert this statement immediately before the statement on which line above?

a.    Line 3

b.    Line 4

c.    Line 7

d.    Line 8

e.    Line 9

f.     It does not matter where we place the if-statement.

 

 

 

 

 

 

 

49.  Referring to the Javascript example in the previous question, how should the if-statement be written?

a.    if (hour < 0)

denverHour = denverHour + 2;

b.    if (hour < 0)

denverHour = denverHour + 24;

c.    if (denverHour < 0)

denverHour = hour + 24;

d.    if (denverHour < 0)

denverHour = denverHour + 24;

e.    if (hour < 0)

hour = denverHour + 24;

f.     if (denverHour < 0)

hour = denverHour + 24;

 

 

 

 

 

 

 

50. The following is an excerpt from an HTML file that implements an interactive form.  It consists of a function and an HTML form.

 

function validate()
{
  var score = 0;
  if (document.survey.first.value == 12)
    ++score;
  if (document.survey.second.value == 4)
    ++score;
  if (document.survey.third.value == 40)
    ++score;
  alert(Your score is + score);


<form name=survey onsubmit=return validate();””>
<p>What is 5+7?  <input type=text name=first value=”” size=30></p>
<p>What is 73?  <input type=text name=second value=”” size=30></p>
<p>What is 8*5?  <input type=text name=third value=”” size=30></p>
<p> <input type=submit value=OK></p>

 

Suppose we were to create a new form.  It begins as follows.

<form name=mouse onsubmit=return cheese();””>
<p> Please enter amount <input type=
text name=amt value=default size=30></p>

 

How should the value from this form be referred to inside the cheese() function?

 

a.    document.cheese.amount.value

b.    document.mouse.amount.value

c.    document.mouse.amt.default

d.    document.mouse.text.value

e.    document.mouse.name.value

f.     none of the above