wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Com prog reviewer prelims

Total questions: 100

Worksheet time: 2hrs 37mins

Name
Class
Date
1.

It is an electronic, programmable device that can store, retrieve, and

manipulate data

(a)  

2.

What are the two major components of a computer? ______ and ______

(a)  

3.

  • -tangible part of the computer

  • -composed of electronic and mechanical parts



(a)  

4.

  • -intangible part of the computer

- consists data and computer programs



(a)  

5.

Give the 5 examples of hardware.

(a)  

6.

where data and instructions needed by the CPU to

perform are stored

(a)  

7.

used to hold programs and data that the processor

is actively working on

(a)  

8.

used to hold programs and data for long term use

(a)  

9.

The following are examples of main memory except:

a)

RAM

b)

ROM

c)

Cache

d)

Flashdrive

10.

The following are examples of secondary memory except:

a)

RAM

b)

Flashdrive

c)

SD card

d)

Hard Disk

11.

an individual storage location in the

memory

(a)  

12.

the relative position of a memory cell in the

computer’s main memory

(a)  

13.

the information stored in a memory cell,

either a program instruction or data

(a)  

14.

-short for Binary Digit

- either a 0 or a 1

-smallest element a computer can deal with

- by grouping them together large range of values can be

represented

(a)  

15.

the amount of storage required to store a single character

(a)  

16.

How many bits make a byte?

(a)  

17.

-coordinate all computer operations

- perform arithmetic and logical operations on data

(a)  

18.

What does the CPU continuously do?

a)

Run, Decode, Execute

b)

Decide, Execute, Run

c)

Fetch, Decode, Execute

d)

Decode, Fetch, Execute

19.

-can execute approximately

3.6 billions of instructions

per second

-able to produce complex

behavior at a speed

almost instantaneous to

human user

(a)  

20.

allows a computer system to interact with the outside world by

moving data in and out of the system

(a)  

21.

peripheral devices used to enter information for computation

e.g keyboard, mice, microphone

(a)  

22.

peripheral devices that receives data from the computer used for

observing the results of computation

e.g. monitor, printer, speaker

(a)  

23.

programs used by a computer to operate

(a)  

24.

collection of instructions that makes a computer

perform a specific task when executed

(a)  

25.

list of instructions that tell a computer what to do

(a)  

26.

programs that assist a computer user in accomplishing specific tasks

e.g. Microsoft Word, Google Chrome, Steam

(a)  

27.

-programs that are needed to keep all the hardware and applications software running

together smoothly

- interface between the hardware and the user applications

e.g. Operating systems like Windows, Linux, MacOS

(a)  

28.

translates a high-level computer program into machine language

e.g. GNU Compiler Collection (GCC)



(a)  

29.

-language directly understood by a computer

-collection of binary numbers understood by a specific CPU

(a)  

30.

-standardized communication technique for expressing

instructions to a computer

- like human languages each has it’s own syntax and grammar

(a)  

31.

-mnemonic codes that correspond to machine language instructions

- computer operations are represented by mnemonic codes rather than

binary numbers and variables can be given names rather than binary

memory addresses

(a)  

32.

- used to write programs that are independent of the CPU on which they will

be executed

- combine algebraic expressions and English symbols

- is not directly understood by a computer

(a)  

33.

rules of a specific programming language



(a)  

34.

‣ it defines how we can put together symbols, reserved words

and identifiers to make a valid program

(a)  

35.

refers to the meaning of a program statement and it’s

purpose and role in a program

(a)  

36.

also referred to as the Program Development Lifecycle

‣ basic steps in trying to solve a problem on a computer

Steps,

1. Problem Definition

2. Problem Analysis

3. Algorithm Design and Representation

4. Coding and Debugging

2

(a)  

37.

‣ a clearly defined problem is already half the

solution

‣ computer programming requires us to define the

problem first before we even try to create a solution

e.g

“Create a program that will determine the number of

times a name occurs in a list.”

(a)  

38.

‣ involves breaking up the problem into smaller and simpler

sub-problems

‣ read the problem statement carefully to obtain a clear idea of

the problem and to determine the inputs and outputs

1. identify the data you have to work with - inputs

2. identify the desired results - outputs

3. develop a list of formulas to specify the relationships between

the inputs and outputs

22

(a)  

39.

‣ list of steps for solving a problem

‣ a clear unambiguous specification of the steps needed to solve a problem

‣ is a well-ordered collection of unambiguous and effectively computable

operations that, when executed, produces a result and halts in a finite amount of

time.

(a)  

40.

After constructing the algorithm, it is now possible

to create the source code. Using the algorithm as

basis, the source code can now be written using

the chosen programming language.

(a)  

41.

‣ occur if there is syntax error in the code

‣ the compiler will detect the error and the program won’t compile

‣ the programmer won’t be able to form an executable program that a user can’t run until

the error is fixed

(a)  

42.

(a)   <stdio.h>

int main() {

printf(“Hello World\n”);

return 0;

}

43.

this includes a file called stdio.h which allows us

to use certain commands

(a)  

44.

stdio is short for (a)   which

means it has commands for input like reading from

the keyboard and output like printing things on the

screen

45.

‣ is a function “called” by the operating system when

the program is executed

‣ the name of the point where the program starts

‣ entry point of every program

(a)  

46.

used very often in C to group commands together

(a)  

47.

is the command used to display and print

text to the screen

(a)  

48.

‣ sends an exit signal/status to the operating system

‣ the end of the program has already been reached

(a)  

49.

‣ serve as inline documentation

‣ provide supplementary information to better

understand a program

‣ ignored by the preprocessor directive and compil

(a)  

50.

‣ spaces, blank lines and tabs

‣ used to separate words and symbols in a program

(a)  

51.

‣ define what a program statement means

‣ define the purpose or role of a program statement

(a)  

52.

‣ high-level programming language developed in

1972 by Dennis Ritchie at AT&T Bell Laboratories

‣ designed to write the UNIX operating system

‣ originally used primarily for systems programm

(a)  

53.

Who developed C?

(a)  

54.

When was C developed?

(a)  

55.

Where was C developed?

(a)  

56.

‣ a system program that modifies a C program prior to its compilation

(a)  

57.

‣ a command that gives instruction to the preprocessor

‣ begins with a number symbol (#) as its first nonblank character

(a)  

58.

‣ a collection of useful functions and symbols that may be accessed by a

program

‣ has a standard header file whose name ends with the symbols .h

(a)  

59.

‣ causes the preprocessor to insert definitions from a standard

header file into a program before compilation

‣ gives the program access to a library

‣ tells the preprocessor where to find the meanings of standard

identifiers used in the program

(a)  

60.

‣ notifies the C preprocessor to replace each occurrence of the identifier NAME by

value

‣ C program statements cannot change the value associated with the NAME

(a)  

61.

name that is replaced by a particular constant value before the program is sent to

the compiler

‣ an executing C program cannot change the value of a name defined as a constant

macro

(a)  

62.

‣ every C program has a main function

‣ marks the point where program execution begins

(a)  

63.

‣ remaining lines of the program enclosed in curly brackets

(a)  

64.

‣ a word that has special meaning in C and cannot be

used for other purposes

(a)  

65.

‣ a word that have special meaning but one that can be

redefined and used by a programmer for other

purposes

‣ redefinition is not recommended because C will no

longer be able to use it for its original purpose

(a)  

66.

‣ identifiers chosen by a programmer to name memory

cells that will hold data and program results

(a)  

67.

An identifier must consist of:

a)

Letters

b)

Digits

c)

Underscores

d)

Hashtags

68.

An identifier can begin with a digit.

a)

True

b)

False

69.

A C reserved word cannot be used as an identifier.

a)

True

b)

False

70.

‣ a name associated with a memory cell whose value can

change as the program executes

(a)  

71.

‣ statements that communicate to the compiler the names of

variables in the program, the kind of information stored in

each variable and how that information will be represented in

memory

(a)  

72.

‣ a set of values and operations that can be performed on those values

(a)  

73.

‣ used to represent integers in C

‣ integers are positive and negative real numbers

‣ whole numbers are integers

‣ because of the finite size of a memory cell, not all integers

can be represented

(a)  

74.

‣ predefined data types

(a)  

75.

‣ used to represent real numbers in C

‣ real numbers has an integral part and a fractional part that are

separated by a decimal point

(a)  

76.

‣ used to represent an individual character value - a letter, a digit or a special symbol

‣ each value is enclosed in single quotes

‣ represented in the memory as an integer whose value

is determined by the code used by the C compiler

(a)  

77.

Meaning of ASCII

(a)  

78.

‣ follow after the declarations in a function

‣ C statements used to write or code the algorithm and

its refinements

(a)  

79.

‣ an instruction that stores a value or a computational

result in a variable

‣ used to perform most arithmetic operations in a

program

(a)  

80.

‣ alternative way of storing values or computational results into a

variable

‣ done by copying data from an input device into a variable

(a)  

81.

‣ an instruction that copies data from an input device into memory

(a)  

82.

‣ an instruction that displays information stored in memory

(a)  

83.

‣ C functions that perform input and output operations

(a)  

84.

‣ activating a function

(a)  

85.

‣ sequence of characters enclosed in quotes which specifies the form of the

output

(a)  

86.

‣ enclosed in round brackets following the function name

‣ provides information needed by the function

(a)  

87.

‣ variables or expressions whose values are displayed

(a)  

88.

‣ a symbol beginning with a % in a format string that indicates where to display

the output value

‣ an abbreviation for the type of data it represents

(a)  

89.

What do you call a symbol beginning with % in a format string that indicates where to display the output

value? *

a)

Modulo

b)

Placeholder/Format Specifier

c)

Assignment Operator

d)

Variable

90.

‣ each operator manipulate two operands, which may be

constants, variables or other arithmetic expressions

(a)  

91.

( / )

‣ will compute the integral part of the result when applied to two positive integer

operands

(a)  

92.

( % )

‣ also known as the Modulo Operator

‣ returns the integer remainder of the result of dividing its first operand by its second

operand

(a)  

93.

‣ are operator with one operand

(a)  

94.

‣ an operator with two operands

(a)  

95.

‣ an expression with operands of different types

(a)  

96.

‣ the expression being evaluated and the variable to which it is assigned have

different data types

(a)  

97.

‣ also called subroutine, chunk of code, building block of a

program

‣ allow complicated programs to be divided into small

blocks – “divide and conquer”

‣ a named sequence of statements that performs some

useful procedure

‣ is a complete and independent program

‣ can be thought of as a “black box” that has passed one

or more input values and automatically returns a single

output value

(a)  

98.

‣ promotes code reuse by providing predefined

functions that can be used in your programs

(a)  

99.

‣ library containing predefined functions that can be

used to perform input and output operations

(a)  

100.

‣ standard math library containing predefined functions

that can be used to perform mathematical

computations

(a)