wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

CIS17A Quiz 1 Review

Total questions: 20

Worksheet time: 20mins

Name
Class
Date
1.

What type of programming languages is close to the level of the computer and resembles the numeric machine language of the computer more than the natural language of humans?

a)

low-level language

b)

high-level language

c)

C++

d)

HTML

2.

What type of program combines the object file with the necessary library routines during the last phase of the translation process of a program?

a)

creator

b)

linker

c)

builder

d)

debugger

3.

The programming process consists of several steps, which include design, creation, testing, and what other activity?

a)

analyzing

b)

modeling

c)

compiling

d)

debugging

4.

What type of directives causes the contents of another file to be inserted into the program?

a)

#insert

b)

#include

c)

#add

d)

#import

5.

For an integer literal is treated as a long long int, what should be appended at the end of the number?

a)

f

b)

L

c)

LL

d)

I

6.

Which of the following option represents a character literal?

a)

"H"

b)

'H'

c)

(H)

d)

{H}

7.

Apply mathematical expression precedence rule and find the result for: 13 + 9 * 2 − 5

a)

26

b)

41

c)

40

d)

66

8.

In C++, what type of expressions lets you manually promote or demote a value?

a)

compound assignment

b)

type classifying

c)

type casting

d)

static-cast

9.

What C++ function is used to pause the screen until the key is pressed and does not need to store that character?

a)

cin.get

b)

cin.enter

c)

cin.find

d)

cin.input

10.

What header file is required by rand() function to generate random number?

a)

iostream

b)

cmath

c)

cstdlib

d)

string

11.

Which of the following options is a stream manipulator, which terminates a line in cout and begin a new line?

a)

finishl

b)

endl

c)

newl

d)

terminatorl

12.

Which of the following options is considered to be commands to the preprocessor, which runs prior to the compiler?

a)

preprocessor loader

b)

preprocessor starter

c)

preprocessor heading

d)

preprocessor directives

13.

Given cylVolume = pow(5.0, 3.0); what is the value of cylVolume?

a)

25

b)

125

c)

5

d)

3

14.

Given the following statements

int x, y = 4;

float z = 2.7;

x = y * z;


Which variable will be promoted as the result of the program?

a)

y will be promoted to float

b)

x will be promoted to float

c)

z will be promoted to int

d)

all variables are promoted to double

15.

Given the following statements

int x, y = 4;

float z = 2.7;

x = y * z;


What is the result for x?

a)

10.8

b)

10.4

c)

10

d)

6.7

16.

Given the following statements:

int num1, num2, num3;

num1= 144;

num2 = pow(5.0, 2.0);

num3 = squrt(num1 + num2);


What is the value of num3?

a)

13

b)

12

c)

11

d)

10

17.

Given the following statements

value = 23;

cout << setw(5) << value;


Determine the character positions, or spaces, on the screen to print the value in.

a)

23

b)

18

c)

5

d)

0

18.

Given variable1 = 24.607. Which of the following setprecision manipulator options will show variable1 as 24.6

a)

setprecision(1)

b)

setprecision(2)

c)

setprecision(3)

d)

setprecision(4)

19.

Given the following statements:

int var1 = 10;

int var2 = 20;

var2 += var1;

int var3 = var2 * 3;


What is the value of var3?

a)

50

b)

70

c)

90

d)

120

20.

Given the following statements:

int num = 1;

num += 2;

num *=10;


What is the value of variable num?

a)

30

b)

40

c)

50

d)

60