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. * / % + -
auto
Arithmetic Operators
fixed
heap
2. A function that can be used to read character data including whitespace
reserve words
source file
private
cin.get(ch)
3. The stream insertion operator
recursive function
fstream
<<
editor
4. A constant object must be __________; it cannot be modified after it is created.
register
initialized
variable
if...else
5. Use 2 characters to represent one
escape sequences
variables
/n
function scope
6. A memory location with a name and data type - its content may be changed during program execution
variable
Preprocessor
continue
cmath
7. The _____ causes the contents of another file to be inserted into a program.
whitespace
non-static
#include directive
editor
8. To write data to a file you define an object of which one of the following
::
ofstream
type casting (conversion)
reserved words
9. An array that uses two subscripts is referred to as a(n) _________ array.
0
auto
two-dimensional
unary operator
10. This manipulator is used to establish a field width for the value immediately following it.
private
setw
const datatype identifier = value
function prototype
11. The ________ enables access to a global variable with the same name as a variable in the current scope.
*
unary scope resolution operator (::)
% modulus
#include <headerfilename>
12. A file must be ________ before data can be written to or read from it.
opened
0
#include
*
13. Nonexecutable statements that are included in a program to provide information about what the program does etc.
auto
comments
cin.get(ch)
constant variable
14. Names of things that are used in a program - can apply to variables & constants and functions
Counter-controlled or definite
pointer
semantics
identifiers
15. Initializers __________ must be used to initialize constant members of a class.
like-type expression
default constructor
member
const
16. A type of pointer that can point at objects of any data type.
Literals
syntax
void pointer
polymorphism
17. Identifier or expression that is part of the calculation to be performed
base
type coercion
Literals
operand value
18. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
const
function prototype
case sensitive
classes
19. A human readable file that contains C++ program
overloading
cin >> variable
attributes
source file
20. An expression that has operands with different data types
associations
classes
mixed expression
data type
21. If a member initializer is not provided for a member object of a class the object's __________ is called.
<<
default constructor
linker
initialized
22. Whole numbers - no decimals and no commas included
friend
cmath
int values
reserved words
23. The ________ of an identifier is the portion of the program in which the identifier can be used.
#include <headerfilename>
private
scope
register
24. 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
floating-point
cout
rand
25. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
recursive function
#include
Sentinel
function scope
26. A C++ statement that makes a decision is ______.
associations
local variable
classes
if
27. A pointer is a variable that contains as its value the____________ of another variable.
cin.get(ch)
address
if...else
*
28. Grammar rules of the language; compiler will try to identify and locate syntax errors
sorting
syntax
const
variable
29. 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
30. When a value of one data type is implicitly (automatically) changed to another data type
srand
const
pointer
type coercion
31. 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.
friend
virtual functions
assignment
special symbols
32. 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.
continue
named constant
a.out
endl (same as 'n')
33. The only integer that can be assigned directly to a pointer is_____________.
type
continue
assignment
0
34. Naming convention for C++ programs
floating-point
Sentinel
beginning
.cpp
35. The sign you use for pointers
setw
*
Literals
cin.get(ch)
36. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
fstream
friend
pointer
register
37. Used to qualify hidden names so that they can be used.
?
scope resolution operator
operator overloading
before
38. Operator with two operands
derived class
getline
binary operator
function prototype
39. The __________ operator reclaims memory previously allocated by new.
two-dimensional
delete
static
classes
40. Sets floating-point values to a fixed decimal format
case sensitive
this
fixed
char
41. The sign you use for references
delete
switch
private
&
42. The number used to refer to a particular element of an array is called its ________.
<<
static
void
subscript (or index)
43. Every C++ statement ends with a(n) _________.
semicolon
source file
assignment
globals
44. The symbol for the binary scope resolution operator
private
char
::
function call
45. Type casting syntax
derived class
static_cast<char>(65)
global
syntax
46. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
floating-point
new line
function parameters
allocating memory
47. The size & shape & color and weight of an object are considered
binary operator
attributes
?
auto
48. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
binary operator
token
new line
selection
49. int namespace include using return examples of ___________
void
switch
dot (.)
reserve words
50. Used for function calls and local variables
void
char
const datatype identifier = value
stack