EXERCISE REVISION TOPIC 1
SECTION A: MULTIPLE CHOICE QUESTION
INSTRUCTION : Circle the correct answer.
1. Which
of the following is NOT an input device?
A. A. Mouse
B. B. Keyboard
C. C. Speaker
D. D. Microphone
2. Which of
the following is a secondary memory device? |
|
||
|
A.
|
Keyboard |
|
|
B. | Disk |
|
|
C.
|
Printer |
|
|
D.
|
Mouse |
|
3. Which statement(s) below is
TRUE about computer main memory?
i.
Main memory is volatile
ii.
Main memory is also called
RAM
iii.
It is an internal and external main memory
iv.
A program in execution must be
running in main memory
A.
i,ii only
B.
i,ii,iii only
C. i,ii and iv only
D. All are true
4. Which of the statements below are FALSE about
Java program?
i.
All Java bytecode files are in machine
language form
ii.
All Java bytecode
files are machine dependent
iii.
The Java source
code file is in machine language form
iv.
Java source code is
always translated directly to machine code
A.
i and ii only
B.
i,ii and iv only
C.
iii and iv only
D. All are false
5. A software is consist of _________________________
A. the program
part excluding the data
B. program and data together
C. program and
part of hardware
D. data only
excluding program
6. The function of the JVM is to
_____________________________
A. act as a
compiler to translate a java code to the target machine language code.
B. provide a simulated memory
and CPU to run the java code written by user.
C. interpret a translated java bytecode in a
target machine environment.
D. provide
a translation of code from a machine independent code to a machine dependent
code.
7. The computer
stores a program while the program is running, as well as the data that the
program is working with, in __________. |
|
A. |
secondary storage |
B. |
the CPU |
C. |
main memory |
D. |
the microprocessor |
|
|
|
SECTION B:
STRUCTURED QUESTION
Instruction: Answer ALL questions in the space provided.
1.
List FOUR (4) major differences between
a secondary storage and primary storage.
PRIMARY
STORAGE |
SECONDARY STORAGE |
Volatile |
Non- Volatile |
Capacity - Low |
Capacity - Large |
Price - Expensive |
Price - Cheap |
Faster |
Slower than primary |
2.
Give ONE difference between Java
compiler and Java interpreter.
-
Java compiler is translates Java source code into a special
representation called bytecode .
-
Java interpreter is translates bytecode into machine language
and executes it.
3. |
Answer
all the following questions with regard to computers and programming
languages. a)
What is the difference between a compiler
and an assembler? -
A compiler is a software tool which
translates from high level language into a specific machine language. -
An assembler translates from
assembly language into a specific machine language. b)
What is the difference between a Java
compiler and a compiler of other languages such as C? -
Java compiler - translates
Java source code into a special representation called bytecode . -
Compiler - translates high
level language to machine language |
|||||||||
|
|
|||||||||
4. |
Complete
the following table to differentiate between the application and system
software.
|
|||||||||
5. |
Briefly describe THREE (3) types of errors that can occur in the
programming process in the table below. For each type of the error, you can
include an example of the error in your description.
|
6. What is the output of the
following Java code segment?
a. |
System.out.print("Hello"); |
|
HelloWorldHello World |
b. |
System.out.println("Brothers
and Sisters"); System.out.println("How"); |
|
Brothers and Sisters How AreYou? |
7. Write
a Java program to display the following output:
+-------------------------+
|
STIA1113 |
|
PROGRAMMING 1 |
+-------------------------+
Comments
Post a Comment