HW 1 Exercise Quiz
Due Jan 31 at 11:59pm Points 50 Questions 25 Time Limit None Allowed Attempts 3
Attempt History
Attempt Time Score
KEPT Attempt 3 9 minutes 48 out of 50
LATEST Attempt 3 9 minutes 48 out of 50
Attempt 2 12 minutes 34 out of 50
Correct answers are hidden.
Score for this attempt: 48 out of 50 Submitted Jan 31 at 11:46pm
This attempt took 9 minutes.
Attempt 1 395 minutes 22 out of 50
Question 1
2 / 2 pts
In relational database terminology, a row an attribute.
True False
Correct
Question 2
2 / 2 pts
Main memory in a computer is volitile.
Question 3
2 / 2 pts
High order programs, (HOL6), abstract away the details of Level 7 (App7).
True False
High order languages, (HOL6), abstract away the details of the levels below it in the seven level abstraction
model, (level 1 – level 5) Page 8 and 9 of text
True False
An important characteristic of main memory is that it is volatile. This is, if the power source to the computer is discontinued, the information in main memory is lost. Page 16 of text
Question 4
2 / 2 pts
An operating system has three general functions. They are:
file management, assembly management, and processor management input management, file management, and output management
Question 5
2 / 2 pts
System software makes the computer accessible to end user at Level App7.
True False
Correct
file management, memory management, and processor management.
machine language management, memory management, and output management
An operating system has three general functions;
File management Memory management Processor management
Page 19 of text
Question 6
2 / 2 pts
An _______________ is a set of instructions that, when carried out in the proper sequence, solves a problem in a finite amount of time.
Question 7
2 / 2 pts
The Central Procession Unit, CPU, of a computer contains its own small set of memory. This memory is called ______________.
ROM RAM indexes registers
program abstraction algorithm iteration
An algorithm is a set of instructions that, when carried out in the proper sequence, solves a problem in a finite amount of time. Page 17 of text
Question 8
2 / 2 pts
The operating system is between what to layers in the abstraction model of a computer system?
Level 6 (HOL6) and Level 4 (ISA4)
Question 9
2 / 2 pts
The table structure of a relational database has a fixed number of rows and a variable number of columns
True False
Correct
Question 10
2 / 2 pts
In the abstraction model of a computer system, what does ISA stand for and what level is it?
Instruction Set Array Level 4 Instruction Set Architecture Level 5 Iteration Size of Array Level 3 Instruction Set Architecture Level 3
Level 7 (App7) and Level 5 (Asmb5) Level 5 (Asmb5) and Level 3 (ISA3)
The operating system is not part of the abstraction model of a computer system.
Question 11
2 / 2 pts
Fill in the answer that you calculated for 1.10 (b)
Round to the nearest tenth of a KB. (What is 210) Do not include any units.
8.2
24 x 80 x 35 = 67200 pixels
67200 / 8 =8400 bytes
8400/1024 is approximately 8.2 KB
nanswered
Question 12
0 / 2 pts
Fill in the answer that you calculated for 1.13
Use the table in Figure 1.15
Question 13
2 / 2 pts
U
Question 14
2 / 2 pts
The Fibonacci number is the sum of the preceding two Fibonacci numbers.
fin(n)=fib(n-1)+fib(n-2) for n>1 fib(0)=0
fib(1)=1
Compute fib(5)
5
Fill in your answer that you calculated for 1.5
Just provide the number. Do not provide any units after the number.
32
40 wpm
6 characters per word (add a space)
240 characters per minute
1920 bits per minute ( 8 bits per character) 32 bits per second (divide by 60)
Question 15
2 / 2 pts
Question 16
2 / 2 pts
In C++, pointers are deallocated by: The free operator
The pop operator The end operator The delete operator
What level of abstraction is a C++ program?
ISA3 APP7 HOL6 ASSM5
C++ is a high order programming language that operates at Level 6.
HOL6
Question 17
2 / 2 pts
The Fibonacci number is the sum of the preceding
two Fibonacci numbers.
fin(n)=fib(n-1)+fib(n-2) for n>1
Question 18
2 / 2 pts
What is the function of a complier?
It performs the translation from HOL6 to ISA3
It converts assembly language into machine language. It performs the translation from HOL6 to ASSM5
It outputs the results of a program
The function of the compiler is to perform the translation from a program written in HOL6 to machine language at ISA3.
fib(0)=0
fib(1)=1
Compute fib(4)
3
fib(4) = [fib(3)] +[fib(2)] =[fib(2) + 1] +[1+0]
=[1+ 0 + 1] +[1] =[2] + [1] =3
Question 19
2 / 2 pts
In C++, the & symbol after the type in the parameter
list does what?
The & symbol alerts the compiler that the parameter
is call by value.
The & symbol alerts the compiler to swap the actual
and formal parameter.
The & symbol alerts the compiler that the parameter
is call by reference.
The & symbol alerts the compiler that the parameter
is a placeholder.
Page 51
To specify that a parameter is called by
reference, you place the & symbol after the
type in the parameter list.
Question 20
2 / 2 pts
In a call by reference procedure, if the procedure changes the formal parameter, the corresponding actual parameter also changes.
True False
Question 21
2 / 2 pts
In C++, the Towers of Hanoi is a game that can be modeled with a ___________________ function
recursive looping iterative conditional
P 51
In call by reference, the formal parameter gets
a reference to the actual parameter. If the
called procedure changes the value of its
formal parameter, the corresponding actual
parameter in the calling program changes.
Question 22
2 / 2 pts
In C++, a void function perform their processing
___________________.
without returning a return address
without parameters
without a call to the compiler
without returning a value
Question 23
2 / 2 pts
In C++, arrays are always called by
_________________.
reference
value
formal parameter
actual parameter
Page 61
In C++, arrays are always called by reference.
Functions that return void perform their
processing without returning a value at all.
Question 24
2 / 2 pts
In C++, what is the difference between a global variable and a local variable?
Global variables are allocated at a fixed location in memory. Local variables are dynamically allocated on the heap.
Question 25
2 / 2 pts
What is the binary coefficient for n=3 and k= 2?
3
Page 63 Use the table or
b(n,k) = b(n-1,k) + b(n-1,k-1) for 0 ≤ k ≤ n
b(n,0)=1
b(k,k)=1
Quiz Score: 48 out of 50
Global variable are dynamically allocated and are constant. Local variables are allocated on the run-time stack.
Global variables are allocated at a fixed location in memory. Local variables are allocated in read only lmemory.
Global variables are allocated at a fixed location in memory. Local variables are allocated on the run-time stack.