NEW
Font size
WorksheetsCIS17A Quiz 1 Review
Total questions: 20
Worksheet time: 20mins
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?
low-level language
high-level language
C++
HTML
What type of program combines the object file with the necessary library routines during the last phase of the translation process of a program?
creator
linker
builder
debugger
The programming process consists of several steps, which include design, creation, testing, and what other activity?
analyzing
modeling
compiling
debugging
What type of directives causes the contents of another file to be inserted into the program?
#insert
#include
#add
#import
For an integer literal is treated as a long long int, what should be appended at the end of the number?
f
L
LL
I
Which of the following option represents a character literal?
"H"
'H'
(H)
{H}
Apply mathematical expression precedence rule and find the result for: 13 + 9 * 2 − 5
26
41
40
66
In C++, what type of expressions lets you manually promote or demote a value?
compound assignment
type classifying
type casting
static-cast
What C++ function is used to pause the screen until the key is pressed and does not need to store that character?
cin.get
cin.enter
cin.find
cin.input
What header file is required by rand() function to generate random number?
iostream
cmath
cstdlib
string
Which of the following options is a stream manipulator, which terminates a line in cout and begin a new line?
finishl
endl
newl
terminatorl
Which of the following options is considered to be commands to the preprocessor, which runs prior to the compiler?
preprocessor loader
preprocessor starter
preprocessor heading
preprocessor directives
Given cylVolume = pow(5.0, 3.0); what is the value of cylVolume?
25
125
5
3
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?
y will be promoted to float
x will be promoted to float
z will be promoted to int
all variables are promoted to double
Given the following statements
int x, y = 4;
float z = 2.7;
x = y * z;
What is the result for x?
10.8
10.4
10
6.7
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?
13
12
11
10
Given the following statements
value = 23;
cout << setw(5) << value;
Determine the character positions, or spaces, on the screen to print the value in.
23
18
5
0
Given variable1 = 24.607. Which of the following setprecision manipulator options will show variable1 as 24.6
setprecision(1)
setprecision(2)
setprecision(3)
setprecision(4)
Given the following statements:
int var1 = 10;
int var2 = 20;
var2 += var1;
int var3 = var2 * 3;
What is the value of var3?
50
70
90
120
Given the following statements:
int num = 1;
num += 2;
num *=10;
What is the value of variable num?
30
40
50
60
