SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
C++ Programming Basics
Start Test
Study First
Subject
:
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. A set of values together with a set of operations
data type
cmath
identifiers
function overloading
2. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
reserve words
subscript (or index)
register
cin >> variable
3. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
beginning
cin.get(ch)
globals
4. Header file that contains commonly performed mathematical functions
stack
public
cmath
Semicolon
5. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
pointer
0
?
escape sequences
6. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
*
information hiding
if...else
7. __________ can be used to assign an object of a class to another object of the same class.
template
Default memberwise assignment
operator overloading
non-static
8. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
Semicolon
non-static
const
Stack overflow
9. A function is invoked with a ________.
function call
editor
template
int values
10. A function that can be used to read character data including whitespace
associations
named constant
cin.get(ch)
beginning
11. Classes can have relationships with other classes. These relationships are called ________.
void
associations
semantics
cin
12. Words that are used for special purposes in a program
type
reserved words
public
two-dimensional
13. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
new line
local variable
function scope
14. A human readable file that contains C++ program
type coercion
source file
token
static
15. The address-of operator. it is used to assign pointers and to print the address of variables.
Stack overflow
identifiers
this
&
16. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
type casting (conversion)
srand
register
17. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
if...else
function parameters
reserve words
virtual functions
18. The only integer that can be assigned directly to a pointer is_____________.
variable
object-oriented analysis and design (OOAD)
searching
0
19. Member objects are constructed __________ their enclosing class object.
two-dimensional
before
const
int values
20. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
rand
&
pointer
loader
21. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
semantics
function prototype
static
22. The _____ causes the contents of another file to be inserted into a program.
#include directive
scope
function call
object file
23. Function ________ is used to set the random number seed to randomize a program.
recursive function
arithmetic expression
srand
selection
24. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
continue
arithmetic expression
non-static
object-oriented analysis and design (OOAD)
25. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
escape sequences
/n
this
address
26. Associate an identifier with a memory location
unary scope resolution operator (::)
register
function scope
allocating memory
27. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
definition
inheritance
% modulus
default constructor
28. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
return
{ }
>>
29. A filestream variable that represents the default output device
scope resolution operator
cout
Literals
token
30. For every opening brace in a C++ program there must be a ______________.
selection
default constructor
Default memberwise assignment
Closing brace
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
strcmp()
NULL
like-type expression
const
32. Naming convention for C++ programs
::
recursive function
.cpp
virtual functions
33. An array that uses two subscripts is referred to as a(n) _________ array.
type coercion
reserved words
two-dimensional
if...else
34. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
address
fixed
reserved words
operator overloading
35. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
t
char
access specifier
selection
36. A ________ program executes before the compiler's translation phase begins.
preprocessor
operator
const
continue
37. An expression that has operands with different data types
Closing brace
delete
mixed expression
semantics
38. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
recursive function
showpoint
semantics
rand
39. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
char
Preprocessor
const datatype identifier = value
40. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
strcmp()
floating-point
preprocessor
return
41. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
Literals
recursive
function scope
cmath
42. Preprocessor directive syntax
#include <headerfilename>
integer operands
0
mixed expression
43. A variable declared outside any block or function is a ________ variable.
prompt
void
global
#include <headerfilename>
44. Symbol that denotes an action to be performed
operator
assignment
selection
if...else
45. A memory location with a name and data type - its content may be changed during program execution
variable
const
pointer
loader
46. Returns the length of a string excluding the null terminator.
strlen()
&
linker
opened
47. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
0
switch
base
escape sequences
48. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
floating-point
void
inheritance
static
49. = & | are examples of ____________.
void pointer
special symbols
new line
preprocessor
50. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
<<
semantics
linker