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. An expression in which all operands have the same data type - result will have the same data type as operands
new line
public
like-type expression
if...else
2. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
editor
information hiding
Counter-controlled or definite
overloading
3. For every opening brace in a C++ program there must be a ______________.
Closing brace
object file
prompt
Counter-controlled or definite
4. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
variables
allocating memory
preprocessor
5. Used to qualify hidden names so that they can be used.
int values
preprocessor
scope resolution operator
static
6. A pointer is a variable that contains as its value the____________ of another variable.
address
friend
n
new line
7. Operator with only one operand
unary operator
associations
cin
left
8. Forces the computer to display decimal point and trailing zeroes
template
<<
variables
showpoint
9. A function is invoked with a ________.
function call
Preprocessor
associations
operator
10. The ________ qualifier is used to declare read-only variables.
editor
register
strcpy()
const
11. A function ________ enables a single function to be defined to perform a task on many different data types.
template
type casting (conversion)
continue
reserved words
12. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
unary scope resolution operator (::)
static_cast<char>(65)
function parameters
13. The idea that you can call the same function and the output will depend on the type of object you're using.
recursive
public
polymorphism
operator overloading
14. Member objects are constructed __________ their enclosing class object.
inheritance
void pointer
token
before
15. Two slash marks ( // ) indicate __________ of a comment
Preprocessor
selection
dot (.)
beginning
16. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
default constructor
cin.get(ch)
const
special symbols
17. The address-of operator. it is used to assign pointers and to print the address of variables.
&
editor
return
derived class
18. Words that are used for special purposes in a program
attributes
delete
Arithmetic Operators
reserved words
19. In inheritance the ____________ is the class that supplies the inherited members.
unary operator
variables
base class
scope resolution operator
20. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
continue
new line
object file
void
21. The ________ of an identifier is the portion of the program in which the identifier can be used.
escape sequences
case sensitive
::
scope
22. The ________ program combines the output of the compiler with various library functions to produce an executable image.
delete
default constructor
#include directive
linker
23. The storage-class specifiers are mutable - auto - ________ - extern and static.
?
int values
new line
register
24. Creates a copy of a string.
strcpy()
type coercion
selection
friend
25. An operator that can only be used with int values. result will always be an int.
dot (.)
% modulus
return
switch
26. Whole numbers - no decimals and no commas included
overloading
.cpp
int values
if...else
27. All ______ must be declared before they are used.
static
#include
variables
srand
28. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
non-static
register
int values
function scope
29. A ________ program executes before the compiler's translation phase begins.
fixed
preprocessor
operator
% modulus
30. Header file that contains commonly performed mathematical functions
endl (same as 'n')
Literals
cmath
NULL
31. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
whitespace
type casting (conversion)
new line
function overloading
32. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
attributes
operator overloading
scope
33. Lists and tables of values can be stored in arrays or __________.
{ }
like-type expression
a.out
vectors
34. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
Arithmetic Operators
break
?
base
35. __________ can be used to assign an object of a class to another object of the same class.
unary scope resolution operator (::)
Default memberwise assignment
integer operands
strcpy()
36. Use 2 characters to represent one
attributes
identifiers
syntax
escape sequences
37. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
associations
preprocessor
.cpp
38. 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.
switch
getline
if...else
continue
39. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
cin >> variable
getline
object file
::
40. A constant object must be __________; it cannot be modified after it is created.
operand value
t
initialized
Counter-controlled or definite
41. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
integer operands
#include
/n
comments
42. directive A statement that starts with a # is called a ____________.
Preprocessor
information hiding
derived class
template
43. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
break
access specifier
overloading
44. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
virtual functions
function call
Unified Modeling Language(UML)
address
45. An array that uses two subscripts is referred to as a(n) _________ array.
char
inline functions
like-type expression
two-dimensional
46. Every C++ statement ends with a(n) _________.
this
subscript (or index)
local variable
semicolon
47. A variable that holds the address of another variable.
n
pointer
base class
assignment
48. A variable declared outside any block or function is a ________ variable.
global
polymorphism
prompt
local variable
49. Symbol that denotes an action to be performed
address
unary operator
operator
<<
50. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
Default memberwise assignment
dot (.)
mixed expression
&