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. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
reserve words
Stack overflow
#include
strlen()
2. The symbol for the binary scope resolution operator
syntax
::
a.out
srand
3. The ________ program combines the output of the compiler with various library functions to produce an executable image.
polymorphism
linker
inline functions
loader
4. The ________ enables access to a global variable with the same name as a variable in the current scope.
#include
unary scope resolution operator (::)
rand
n
5. Returns the length of a string excluding the null terminator.
strlen()
private
stack
friend
6. A constant object must be __________; it cannot be modified after it is created.
srand
heap
initialized
Preprocessor
7. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
associations
inline functions
showpoint
n
8. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
before
cin >> variable
derived class
linker
9. The ________ of an identifier is the portion of the program in which the identifier can be used.
data type
opened
scope
heap
10. The three values that can be used to initialize a pointer are 0 - __________ and an address.
static
searching
operator
NULL
11. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
operand value
&
floating-point
12. The process of determining if an array contains a particular key value is called _________ the array.
searching
if
operator
const datatype identifier = value
13. Most calculations are normally performed by ______ statements.
#include <headerfilename>
preprocessor
getline
assignment
14. A variable that is known only within the function in which it is defined is called a ________.
?
operator
local variable
ofstream
15. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
semicolon
non-static
access specifier
16. tab
beginning
two-dimensional
t
attributes
17. Every C++ program begins execution at the function _________.
&
#include <headerfilename>
classes
main
18. Operator with only one operand
fstream
classes
recursive function
unary operator
19. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
<<
named constant
selection
semantics
20. 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.
searching
binary operator
new line
dot (.)
21. A __________ data member represents class-wide information.
non-static
like-type expression
linker
static
22. Naming convention for C++ programs
Counter-controlled or definite
.cpp
allocating memory
subscript (or index)
23. Whole numbers - no decimals and no commas included
mixed expression
int values
escape sequences
left
24. A filestream variable that represents the default output device
.cpp
subscript (or index)
unary operator
cout
25. The _________ begins the body of every function and the _________ ends the body of every function.
NULL
fstream
{ }
escape sequences
26. Program components in C++ are called functions and ________.
escape sequences
data type
semantics
classes
27. A type of pointer that can point at objects of any data type.
void pointer
before
preprocessor
NULL
28. 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.
Sentinel
&
fstream
continue
29. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
left
void pointer
Default memberwise assignment
function overloading
30. Use 2 characters to represent one
escape sequences
function scope
function prototype
stack
31. The _____ causes the contents of another file to be inserted into a program.
srand
Stack overflow
virtual functions
#include directive
32. If a member initializer is not provided for a member object of a class the object's __________ is called.
>>
escape sequences
default constructor
assignment
33. A C++ statement that makes a decision is ______.
if
constant variable
mixed expression
stack
34. A sequence of operands and operators that describe a calculation to be performed
>>
arithmetic expression
strlen()
assignment statement
35. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
cmath
void
char
classes
36. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
reserve words
register
case sensitive
>>
37. To allow file access in a program you must #include this header file.
attributes
t
#include
fstream
38. The number used to refer to a particular element of an array is called its ________.
identifiers
inheritance
subscript (or index)
template
39. Repeating a set of instructions a specific number of times is called_________repetition.
.cpp
Counter-controlled or definite
allocating memory
#include <headerfilename>
40. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
special symbols
arithmetic expression
Literals
41. When a value of one data type is implicitly (automatically) changed to another data type
cmath
type casting (conversion)
ofstream
type coercion
42. Header file that contains commonly performed mathematical functions
inheritance
scope resolution operator
searching
cmath
43. Sets floating-point values to a fixed decimal format
cout
if...else
fixed
strlen()
44. The process of placing the elements of an array in order is called ________ the array.
friend
sorting
allocating memory
/n
45. Preprocessor directive syntax
#include <headerfilename>
?
semicolon
editor
46. You must have a ___________ for every variable you intend to use in a program
new line
vectors
definition
inheritance
47. Nonexecutable statements that are included in a program to provide information about what the program does etc.
?
floating-point
integer operands
comments
48. Classes can have relationships with other classes. These relationships are called ________.
Arithmetic Operators
non-static
associations
delete
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
left
0
function prototype
break
50. A function is invoked with a ________.
char
function call
&
floating-point