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 is used to mark the end of a complete C++ programming statement.
Semicolon
t
assignment
loader
2. Identifier or expression that is part of the calculation to be performed
access specifier
operand value
strlen()
type
3. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
Literals
polymorphism
comments
4. For every opening brace in a C++ program there must be a ______________.
pointer
scope resolution operator
Closing brace
virtual functions
5. Naming convention for C++ programs
.cpp
{ }
setw
editor
6. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
setw
scope resolution operator
scope
auto
7. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
base
return
new line
editor
8. Symbol that denotes an action to be performed
strlen()
operator
strcmp()
if
9. These are data items whose values do not change while the program is running
Literals
inline functions
left
strlen()
10. A filestream variable that represents the default output device
Arithmetic Operators
const
address
cout
11. Repeating a set of instructions a specific number of times is called_________repetition.
0
Counter-controlled or definite
classes
register
12. You must have a ___________ for every variable you intend to use in a program
floating-point
definition
operator overloading
return
13. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
delete
this
escape sequences
14. If a member initializer is not provided for a member object of a class the object's __________ is called.
a.out
default constructor
identifiers
setw
15. C++ programs are normally typed into a computer using a(n) ________ program.
friend
public
editor
variable
16. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
variable
floating-point
semantics
Unified Modeling Language(UML)
17. A member function should be declared static if it does not access __________ class members.
new line
local variable
non-static
heap
18. Forces the computer to display decimal point and trailing zeroes
showpoint
return
&
cin >> variable
19. Header file that contains commonly performed mathematical functions
% modulus
cmath
auto
cin.get(ch)
20. Two slash marks ( // ) indicate __________ of a comment
setw
unary scope resolution operator (::)
beginning
Literals
21. The _________ begins the body of every function and the _________ ends the body of every function.
showpoint
type coercion
inheritance
{ }
22. To explicitly indicate that a value is to be converted to another type
heap
&
void pointer
type casting (conversion)
23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
void pointer
if...else
endl (same as 'n')
inheritance
24. 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.
auto
operator overloading
subscript (or index)
virtual functions
25. The sign you use for references
overloading
&
editor
reserve words
26. tab
::
.cpp
t
default constructor
27. The ________ program transfers the executable image of a C++ program from disk to memory.
switch
private
loader
preprocessor
28. Grammar rules of the language; compiler will try to identify and locate syntax errors
subscript (or index)
syntax
operand value
information hiding
29. A variable that holds the address of another variable.
sorting
cin.get(ch)
pointer
editor
30. * / % + -
syntax
recursive
srand
Arithmetic Operators
31. A file must be ________ before data can be written to or read from it.
opened
Preprocessor
*
searching
32. A memory location with a name and data type - its content may be changed during program execution
new line
arithmetic expression
Unified Modeling Language(UML)
variable
33. The stream extraction operator
/n
special symbols
>>
static_cast<char>(65)
34. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
identifiers
member
function parameters
35. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
allocating memory
Stack overflow
public
36. A filestream variable that represents the default input source
cin
auto
pointer
constant variable
37. Member objects are constructed __________ their enclosing class object.
before
inline functions
subscript (or index)
scope resolution operator
38. 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
auto
floating-point
/n
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
overloading
Preprocessor
token
function scope
40. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
#include
local variable
void pointer
41. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
loader
rand
#include
void
42. The ________ statement in a called function passes the value of an expression back to the calling function.
register
return
::
searching
43. Function ________ is used to produce random numbers.
template
rand
function overloading
variables
44. A program that finds and attaches to your program the indicated libraries for compilation
two-dimensional
<<
Closing brace
preprocessor
45. Characters used to separate symbols or reserved words or identifiers and statements
n
stack
setw
whitespace
46. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
delete
floating-point
#include
47. Syntax for named constant declaration
const datatype identifier = value
main
opened
global
48. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
fstream
this
NULL
integer operands
49. The three values that can be used to initialize a pointer are 0 - __________ and an address.
allocating memory
NULL
0
Stack overflow
50. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
#include <headerfilename>
data type
function overloading
operand value