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 storage-class specifiers are mutable - auto - ________ - extern and static.
srand
classes
friend
register
2. A function ________ enables a single function to be defined to perform a task on many different data types.
register
variable
auto
template
3. All C++ Variables are_________.
srand
reserve words
virtual functions
case sensitive
4. int namespace include using return examples of ___________
virtual functions
pointer
showpoint
reserve words
5. The __________ operator reclaims memory previously allocated by new.
Preprocessor
Sentinel
delete
reserved words
6. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
default constructor
special symbols
binary operator
operator overloading
7. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
overloading
const
local variable
8. All ______ must be declared before they are used.
function prototype
access specifier
heap
variables
9. The elements of an array are related by the fact that they have the same name and ___________.
attributes
{ }
type
cin
10. A function that can be used to read character data including whitespace
cin
cin.get(ch)
syntax
editor
11. Identifier or expression that is part of the calculation to be performed
{ }
operand value
definition
assignment
12. A member function should be declared static if it does not access __________ class members.
allocating memory
non-static
unary operator
identifiers
13. The stream insertion operator
<<
void
0
attributes
14. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
void
this
showpoint
token
15. Words that are used for special purposes in a program
unary scope resolution operator (::)
>>
variable
reserved words
16. A pointer is a variable that contains as its value the____________ of another variable.
semicolon
t
address
public
17. Used to qualify hidden names so that they can be used.
cin
/n
this
scope resolution operator
18. Syntax for named constant declaration
getline
arithmetic expression
token
const datatype identifier = value
19. For every opening brace in a C++ program there must be a ______________.
variable
cin
public
Closing brace
20. 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.
binary operator
/n
&
.cpp
21. Function ________ is used to set the random number seed to randomize a program.
Sentinel
binary operator
srand
unary scope resolution operator (::)
22. 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.
globals
strcpy()
Sentinel
cout
23. A variable that is known only within the function in which it is defined is called a ________.
local variable
type coercion
Default memberwise assignment
0
24. Executable version of program
object file
dot (.)
endl (same as 'n')
attributes
25. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
base
return
beginning
*
26. Header file that contains commonly performed mathematical functions
Closing brace
Sentinel
virtual functions
cmath
27. Grammar rules of the language; compiler will try to identify and locate syntax errors
return
endl (same as 'n')
syntax
unary operator
28. You must have a ___________ for every variable you intend to use in a program
definition
base
comments
int values
29. A human readable file that contains C++ program
stack
pointer
named constant
source file
30. 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.
classes
.cpp
inheritance
Closing brace
31. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
if...else
register
inline functions
32. __________ can be used to assign an object of a class to another object of the same class.
preprocessor
new line
overloading
Default memberwise assignment
33. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
global
preprocessor
overloading
34. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
recursive
Default memberwise assignment
loader
35. tab
.cpp
t
attributes
overloading
36. newline
n
arithmetic expression
before
switch
37. A ________ program executes before the compiler's translation phase begins.
preprocessor
member
unary scope resolution operator (::)
pointer
38. An expression that has operands with different data types
Closing brace
a.out
Default memberwise assignment
mixed expression
39. A __________ should be used to declare the size of an array because it makes the program more scalable.
linker
constant variable
preprocessor
local variable
40. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
before
operand value
searching
41. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
scope resolution operator
#include <headerfilename>
preprocessor
friend
42. A C++ statement that makes a decision is ______.
Counter-controlled or definite
showpoint
Literals
if
43. Associate an identifier with a memory location
allocating memory
pointer
semicolon
whitespace
44. A program that finds and attaches to your program the indicated libraries for compilation
syntax
preprocessor
void
switch
45. A constant object must be __________; it cannot be modified after it is created.
initialized
type
syntax
opened
46. * / % + -
Arithmetic Operators
operator
Literals
arithmetic expression
47. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
function scope
this
searching
cout
48. Type casting syntax
static_cast<char>(65)
% modulus
attributes
constant variable
49. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
fstream
sorting
void
const
50. A set of values together with a set of operations
whitespace
data type
opened
editor