Personal Computer Concepts: Software and Hardware

Spring 1996

Final Exam Sample

NAME ______________________   ID _______________ID#____________ 


Instructions:                                               TEST A

     Mark ALL you answers on the Answer Sheet provided.  NO credit will be
given for answers on this test paper and not on the answer sheet.  For
multiple choice questions, choose the SINGLE best answer.  If you have
any questions, raise your hand and we will come to you.

Multiple Choice / Fill in the Blank, 2 points for each question

1.  If a page of a document is equivalent to 4K bytes, how many pages
will fit on a high-density floppy disk with a capacity of 1.44
megabytes?  ______________

2.   For what inventor's early machine did Ada Lovelace develop programs?

     a.   Jacquard
     b.   von Neumann
     c.   Babbage
     d.   Eckert

3.   A PASCAL compiler is an example of a

     a.   a utility program
     b.   an operating system
     c.   an instruction set

4.   Which of the following declares an array of real numbers called Calendar

     a.   Calendar: Array [1..365] of real;
     b.   Calendar [1..365] : array of real;
     c.   Array of real [1..12] Calendar;
     d.   None of the above

5.  In Turbo Pascal, what command do you use (before the 'write'
command) to enable you to write to a file called 'myfile', which has
been declared as a file of text?_____________

6.   A machine with 32M of RAM has a capacity of how many bytes?

     a.   33554432
     b.   32768
     c.   3200

7.  In a Pascal procedure, the 'scope' of a variable that is defined
in a procedure

     a.   can be altered by other instructions in the main program
     b.   depends on the input data for that program
     c.   is restricted to the set of statements comprising that procedure

8.  In Pascal, a named item containing a value which can change at
runtime is a __________.

9.  The use of punched cards for programming computers was stimulated
by their use for

     a.   controlling the looming of fabric
     b.   controlling the machining of metals
     c.   storing and sorting of Census data

10.  The ENIAC was created for the primary purpose of

     a.   tabulating the results of the US Census
     b.   automating the processing of payroll at the Coca Cola Company
     c.   calculating the trajectories for military guns
     d.   calculating the orbits of the planets

11.  How many bytes are required to store the word SUMMER in computer memory?

     a.   7
     b.   6
     c.   48
     d.   8

12.  The most important reason for using a relational database is its

     a.   query language support
     b.   price
     c.   efficiency

13.  A relational database represents information in the form of a 

     a.   graph
     b.   hierarchy
     c.   table

14.  The memory (RAM) of a personal computer is part of the system's

     a.   operating system
     b.   hardware 
     c.   software

15.  In Turbo Pascal, when you are through using a file called myfile,
what command do you use? ______________________

16.  In Quattro-Pro, a cell whose first character is an @ must contain
a _______________

17.  The number of different values that a Pascal boolean variable can
assume is

     a.   three
     b.   two
     c.   one

18.  The ASCII character set uses how many bits to represent each character?

     a.   8
     b.   256
     c.   16

19.  In Pascal, in the procedure definition
          procedure MetricConvert(measure: real);
     the variable 'measure' passed to the procedure is called _____________.

20.  The machine proposed by Babbage was to be implemented in what technology?

     a.   optical
     b.   mechanical
     c.   electrical

21.  In programming, semantic errors are errors in

     a.   grammar
     b.   timing
     c.   punctuation
     d.   logic

22.  A rectangular area in which part of a spreadsheet is viewed is called a

     a.   section
     b.   reduction
     c.   window

23.  In what country, besides the U.S. and Germany, was there a significant
     development of electronic computers during World War II?

24.  A byte is equivalent to how many bits?

     a.   eight
     b.   two
     c.   four

25.  In Pascal, the 'scope' of a variable is

     a.   the range of values that the variable can take
     b.   the type of the variable
     c.   the range of statements over which the variable exists

26.  There were two pioneering computer programming languages: FORTRAN
     and COBOL.  Which of these was for scientific computing?  ________________

27.  In Turbo Pascal, what command positions you to start reading from
the beginning of a file called 'myfile', which has been declared as a
file of text?_________________

28.  In Pascal, global variables are discouraged because

     a.   they use too much memory
     b.   they cannot be used in procedures
     c.   they limit the modularity of the program

29.  Where do computer applications (e.g. Wordperfect) put the files
currently being used by the application? ____________

30.  Which is the most common form of secondary storage used with
personal computers?  ____________________

31.  Programs written in which of the following computer language
categories are most portable across different machines and operating

     a.   Assembler
     b.   Machine Language
     c.   High-level languages (e.g. Pascal)

32.  Programs of the type .exe will run on 

     a.   only on machines with CPUs made by Intel
     b.   another machine with the same instructions set
     c.   any machine running DOS or Windows

33.  A collection or list of files on disk is called a 

     a.   directory
     b.   database
     c.   document

34.  In Pascal, if the variable position is declared as type char,
which of the following will assign the ASCII character '3' to

     a.   position : '3';
     b.   position := '3';
     c.   position = '3';
     d.   position = 3;
     e.   position : 3;

35.  If wish to back-up your disk by making a duplicate (on a machine
with two floppy drives of the same type), where in Windows do you go
to execute the operations that copy the contents of one disk to
another? __________________________________

36.  The software that must be executed before running an application
program is called the _______________.

37.  There were many problems with vacuum-tube computers, including
cost, size, and power consumption.  The problem that many thought made
impossible an effective computer using vacuum tubes was their

38.  The first commercial (non-military) use of computers in the U.S. was for 

     a.   payroll
     b.   inventory control for a pastry company
     c.   census data processing
     d.   banking

39.  Using WordPerfect, if you edit an existing document and then save
it, without changing any names, the result will be

     a.   the edited version will replace the earlier version on your disk
     b.   a new file will be created on your disk
     c.   the changed version of the document will be appended to the earlier 

40.  How many bytes can be stored in the  Pascal variable declared as 
     var customer :string[20]; 

     a.   160
     b.   256
     c.   20

41.  In Pascal, global variables:
               i.   can be used or changed in the main program.
               ii.  cannot be used or changed by any procedure.
               iii. can be used or changed by any procedure.
               iv.  can have their scope changed by data ready by the 
                    program during execution of that program

     a.    i, and ii
     b.    iv
     c.    i, iii and iv
     d.    i, and iii

42.  The collection of data that a Pascal program reads from a disk is called

     a.   an output file
     b.   a page
     c.   an input file
     d.   a folder

43.  Which is the correct ordering of storage devices in terms of
their transfer time (from slowest to fastest)?

     a.   tape, optical disk, floppy disk, hard disk, RAM
     b.   tape, floppy disk, hard disk, optical disk, RAM
     c.   tape, floppy disk, optical disk, hard disks, RAM

44.  What type of loop automatically increments the counter variable?

45.  An organization of collections of files, and collections within
collections, resembling an upside-down tree is called a

     a.   hierarchial file system
     b.   relational database system
     c.   file cabinet

46.  What invention provided the basic technology that led to the
microcomputer and the resulting personal computer industry?

47.  Which of the following statements best describes the difference
between a compiler and an
     interpreter of a programming language?

     a.   Compilers are used on mainframe computers while interpreters are 
          used on personal computers.
     b.   A compiler converts an entire program to machine language before 
          executing a program while an interpreter translates and then 
          executes the program code a line at a time.
     c.  A compiler translates and then executes the program a line at
         a time, while an interpreter converts an entire program to machine
         language before executing the program.

     d.   A compiler is an application program, while an interpreter is part 
          of the operating system.

48.  The attributes of 'main memory (RAM)' are that it:
         i.  loses information when power is interrupted
         ii. is of secondary value less expensive (than other computer memory)
         iv. is faster than secondary storage

     a.   i and iii
     b.   i and iv 
     c.   i, iii, and iv
     d.   all of the above

49.  The primary advantage of the von Neumann computer architecture over 
     that of the ENIAC was that

     a.    it was a decimal machine
     b.    it used transistors
     c.    it had a multiplier and adder in hardware
     d.    it used a stored program

50.  If TextIn has been declared as a string[15] and the program
contains the statement ReadLn(TextIn); and on execution of the program
the user types:

     When in the course of human events it becomes necessary to 
     ( means carriage return), 

     What will be the output if the program follows with the statement: 
     WriteLn(TextIn); ________________

51.  The technical development which made possible affordable and powerful
     personal computers was 

     a.   MS-DOS
     b.   the integrated circuit
     c.   FORTRAN
     d.   the vacuum tube

52.  How can you make the following loop stop (during execution of the
program containing these Pascal statements)?  Assume Letter is
declared as type char. ________________

            Read (kbd, Letter);
        until (Letter = '\') or (Letter = '/');

Part 2: Points as indicated
53.  (9 points) In a spreadsheet, cell N6 is highlighted.  This cell's
contents are copied to O6.


     K    L    M    N    O    P
3              2    4    3
5         11   12   
6           8   4   [   ]
7           5   6
8         10    9

    a) (3 points) What number will show in cell N6?
    b) (3 points) What is the formula that will result for O6?
    c) (3 points )What number will be in cell O6 (after copying the
formula from N6)?

54. (12 points) How many times will each of the following loops
execute? (Assume count is an integer)

     a)   count := 1                              (3 points)
               while count > 6 do
                         count := count - 2;

     b)   for count :=   0 to  5 do          (3 points)

     c)   count := 0;                             (3 points)
               count := count+1;
               until count >= 5;

     d)   count := 0;                           (3 points)
               while count > 0 do
                    DrawCircle(count, count+1);
                    count := count - 1;

 55. (6 points) In this database, which record numbers would be in the
answer to a query asking

     (a) for all records where BALANCE > CURRENT_CHGS
     (b) for all records where BALANCE > CURRENT_CHGS and PAYMENTS = 0

     1              JONES          $191.70   $191.70        $118.50     $118.50
     2              GARCIA         $195.00   $119.70        $81.50      $156.80
     3              WILLIAMS       $74.16    $74.16         $81.30      $81.30
     4              MILLER         $123.50   0              $116.20     $239.70
     5              LOERA          $79.90    $79.90         $61.40      $61.40
     6              SMITH          $99.50    $99.50         $177.50     $177.50
     7              MANN           $378.60   $378.60        $221.20     $221.20
     8              JACKSON        $53.60    $100.00        $56.00      $9.60
     9              TAYLOR         $63.10    $33.10         $67.30      $97.30
     10              JENSEN        $100.20   $100.20        $101.50     $101.50

56.  (6 points) Video can be compressed (using the new MPEG
compression algorithms) to result a representation that takes
(approximately) 0.15 M Bytes per second of video.  If you have a
connection from your personal computer to a remote computer at ISDN
(56Kbits per second), how long will it take to send one second of
video from the remote computer to your personal computer?

 Note that question 57 is missing the drawing of the logic
gates. Create a logic circuit, or use one from the previous exams.

57.  (8 points) For the logic circuit shown, the equivalent Pascal
statement (assuming all variables have been declared as boolean) is:
D:= A or ( not(A) and B and C )

[AND and OR diagram goes here]

Complete the truth table for this statement / circuit

     A    B    C    D
     0    0    0
     0    0    1
     0    1    0


58.  (5 points) What will be the output of the following program?

     Program foo(input,output);
     var x:integer;

     Procedure bar(i:integer);
     var j:integer;
          for j:=1 to 3 do
                if ( i=j)  then writeln('one') 
                if (i2;


Answers to Final Sample Midterm
 1.360   2.c  3.a  4.a  5.rewrite(myfile)  6.a  7.c  8.variable  9.a  10.c
 11.b  12.a  13.c  14.b  15.close(myfile)  16.function  17.b  18.a  
19.parameter  20.b
 21.d  22.c  23.Great Britain  24.a  25.c  26.fortran  27.reset(myfile)  
28.c  29.main memory   
 30.floppy or hard disk  31.c  32.b  33.a  34.b  35.file manager 36. 
operating systems  37.poor reliability  38.c  39.a
 40.c  41.d  42.c  43.c  44.for  45.a  46.transistor  47.b  48.a  
 49.d  50.When in the cou  51.b'\' or'/'  53a.70
 53b.$m$3*m5+$n$3*n5  53c.24  54a.0  54b.6  54c.5  54d.0  55a.2,4,9
 55b.4  56.20sec
 57. A B C D  
     0 0 0 0      
     0 0 1 0
     0 1 0 0 
     0 1 1 1
     1 0 0 1
     1 0 1 1
     1 1 0 1
     1 1 1 1