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. The modulus operator (%) can be used only with __________.
integer operands
inheritance
case sensitive
NULL
2. * / % + -
&
opened
Arithmetic Operators
identifiers
3. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
ofstream
assignment statement
function call
Sentinel
4. In inheritance the ____________ is the class the receives the inherited members.
derived class
unary scope resolution operator (::)
virtual functions
data type
5. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base
type coercion
global
strlen()
6. 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.
unary scope resolution operator (::)
virtual functions
?
classes
7. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
object file
showpoint
cin >> variable
//
8. newline
n
template
associations
showpoint
9. In inheritance the ____________ is the class that supplies the inherited members.
base class
Literals
unary operator
function call
10. The only integer that can be assigned directly to a pointer is_____________.
0
Sentinel
private
ofstream
11. Function ________ is used to set the random number seed to randomize a program.
function prototype
break
srand
preprocessor
12. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
subscript (or index)
void
function scope
.cpp
13. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
inline functions
virtual functions
attributes
14. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
>>
address
allocating memory
15. The elements of an array are related by the fact that they have the same name and ___________.
associations
type
n
linker
16. The ________ program transfers the executable image of a C++ program from disk to memory.
?
heap
loader
semicolon
17. The ________ program combines the output of the compiler with various library functions to produce an executable image.
like-type expression
function prototype
case sensitive
linker
18. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
editor
derived class
unary operator
inline functions
19. Syntax for named constant declaration
ofstream
address
const datatype identifier = value
NULL
20. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
cout
getline
.cpp
static
21. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
getline
static
information hiding
polymorphism
22. Member objects are constructed __________ their enclosing class object.
initialized
#include
type
before
23. A __________ should be used to declare the size of an array because it makes the program more scalable.
const datatype identifier = value
constant variable
#include
strlen()
24. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
int values
Literals
type coercion
25. A ________ program executes before the compiler's translation phase begins.
heap
preprocessor
fixed
#include directive
26. The __________ operator reclaims memory previously allocated by new.
Arithmetic Operators
rand
&
delete
27. data types that refer to numbers with decimals
floating-point
two-dimensional
break
if
28. The stream extraction operator
>>
cout
constant variable
register
29. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
static
semantics
Literals
default constructor
30. A member function should be declared static if it does not access __________ class members.
escape sequences
non-static
void pointer
local variable
31. Nonexecutable statements that are included in a program to provide information about what the program does etc.
Default memberwise assignment
//
#include directive
comments
32. Message displayed to the screen asking user for input; generated with an output statement
const datatype identifier = value
void
preprocessor
prompt
33. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
34. For every opening brace in a C++ program there must be a ______________.
address
fixed
Closing brace
attributes
35. The address-of operator. it is used to assign pointers and to print the address of variables.
&
named constant
strcmp()
Closing brace
36. A type of pointer that can point at objects of any data type.
source file
pointer
void pointer
selection
37. If a member initializer is not provided for a member object of a class the object's __________ is called.
srand
unary scope resolution operator (::)
inheritance
default constructor
38. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
return
cout
linker
friend
39. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
Semicolon
cmath
preprocessor
register
40. Repeating a set of instructions a specific number of times is called_________repetition.
const datatype identifier = value
function overloading
Counter-controlled or definite
syntax
41. tab
if...else
delete
operator overloading
t
42. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
before
definition
function overloading
derived class
43. Creates a copy of a string.
strcpy()
Default memberwise assignment
floating-point
virtual functions
44. 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.
token
continue
stack
object file
45. Grammar rules of the language; compiler will try to identify and locate syntax errors
arithmetic expression
heap
syntax
type
46. The process of placing the elements of an array in order is called ________ the array.
floating-point
sorting
attributes
function overloading
47. Used for dynamically allocated variables
heap
classes
vectors
function parameters
48. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
main
return
a.out
function scope
49. Program components in C++ are called functions and ________.
NULL
classes
searching
case sensitive
50. A C++ statement that makes a decision is ______.
linker
recursive
if
cout