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. Every C++ statement ends with a(n) _________.
% modulus
semicolon
editor
private
2. This manipulator is used to establish a field width for the value immediately following it.
void
setw
preprocessor
reserved words
3. An expression that has operands with different data types
::
mixed expression
static_cast<char>(65)
information hiding
4. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
% modulus
reserved words
operator overloading
escape sequences
5. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
void
variables
heap
6. The ________ qualifier is used to declare read-only variables.
semicolon
function overloading
variables
const
7. The _________ begins the body of every function and the _________ ends the body of every function.
searching
selection
{ }
constant variable
8. Preprocessor directive syntax
#include <headerfilename>
rand
void
n
9. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
inheritance
unary scope resolution operator (::)
this
10. A pointer is a variable that contains as its value the____________ of another variable.
.cpp
attributes
main
address
11. The stream extraction operator
>>
private
?
special symbols
12. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
const datatype identifier = value
virtual functions
function scope
n
13. Every C++ program begins execution at the function _________.
main
semicolon
assignment
this
14. If a member initializer is not provided for a member object of a class the object's __________ is called.
void pointer
default constructor
void
showpoint
15. The process of determining if an array contains a particular key value is called _________ the array.
identifiers
assignment statement
searching
strcmp()
16. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
cin
if
member
pointer
17. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
NULL
information hiding
break
Closing brace
18. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
unary scope resolution operator (::)
mixed expression
heap
register
19. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
address
preprocessor
new line
Stack overflow
20. Type casting syntax
static_cast<char>(65)
beginning
vectors
operator overloading
21. Identifier or expression that is part of the calculation to be performed
operand value
Counter-controlled or definite
NULL
this
22. A type of pointer that can point at objects of any data type.
syntax
void pointer
0
comments
23. C++ programs are normally typed into a computer using a(n) ________ program.
member
left
editor
void
24. An expression in which all operands have the same data type - result will have the same data type as operands
int values
>>
/n
like-type expression
25. The sign you use for references
rand
member
&
left
26. Message displayed to the screen asking user for input; generated with an output statement
prompt
allocating memory
strlen()
auto
27. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
derived class
function prototype
semicolon
scope
28. newline
Default memberwise assignment
int values
a.out
n
29. Operator with two operands
case sensitive
binary operator
subscript (or index)
overloading
30. A program that finds and attaches to your program the indicated libraries for compilation
left
function scope
template
preprocessor
31. All ______ must be declared before they are used.
.cpp
variables
sorting
function call
32. 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.
whitespace
beginning
virtual functions
global
33. 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.
dot (.)
0
NULL
address
34. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
function call
char
Literals
reserve words
35. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
void pointer
overloading
/n
36. 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.
semicolon
static
pointer
public
37. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
this
mixed expression
Stack overflow
function overloading
38. Naming convention for C++ programs
.cpp
*
Counter-controlled or definite
subscript (or index)
39. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
function scope
#include
fixed
token
40. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
#include
source file
scope
41. Allows the programmer to store a value in a variable
assignment statement
sorting
object-oriented analysis and design (OOAD)
comments
42. Used to qualify hidden names so that they can be used.
continue
scope resolution operator
unary operator
private
43. Words that are used for special purposes in a program
escape sequences
token
reserved words
prompt
44. 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
45. The storage-class specifiers are mutable - auto - ________ - extern and static.
global
register
prompt
comments
46. 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.
inheritance
heap
initialized
public
47. A memory location with a name and data type - its content may be changed during program execution
variable
Sentinel
type casting (conversion)
recursive
48. All C++ Variables are_________.
syntax
editor
prompt
case sensitive
49. Keyword public is a(n) _________
{ }
strcpy()
access specifier
Sentinel
50. Lists and tables of values can be stored in arrays or __________.
beginning
vectors
rand
escape sequences