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. Syntax for named constant declaration
const datatype identifier = value
operator
beginning
linker
2. Returns the length of a string excluding the null terminator.
public
Preprocessor
n
strlen()
3. In inheritance the ____________ is the class the receives the inherited members.
derived class
preprocessor
source file
operand value
4. The process of placing the elements of an array in order is called ________ the array.
sorting
binary operator
special symbols
mixed expression
5. A variable declared outside any block or function is a ________ variable.
return
global
template
classes
6. A set of values together with a set of operations
fstream
type casting (conversion)
data type
identifiers
7. Compares two strings and returns 0 if they are equal.
data type
Literals
strcmp()
return
8. A member function should be declared static if it does not access __________ class members.
static_cast<char>(65)
auto
if...else
non-static
9. newline
reserved words
address
n
Arithmetic Operators
10. * / % + -
operand value
Arithmetic Operators
void
getline
11. 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.
static
data type
case sensitive
return
12. The number used to refer to a particular element of an array is called its ________.
showpoint
subscript (or index)
mixed expression
setw
13. This manipulator causes the field to be left-justified with padding spaces printed to the right.
fixed
left
function parameters
static
14. Class members specified as _________ are accessible anywhere an object of the class is in scope.
token
selection
associations
public
15. You can declare default values for a function in the ____________________.
srand
char
function parameters
Unified Modeling Language(UML)
16. Type casting syntax
constant variable
static_cast<char>(65)
allocating memory
Default memberwise assignment
17. Classes can have relationships with other classes. These relationships are called ________.
associations
ofstream
template
n
18. To write data to a file you define an object of which one of the following
comments
allocating memory
ofstream
switch
19. The __________ operator reclaims memory previously allocated by new.
heap
delete
void
base
20. The storage-class specifiers are mutable - auto - ________ - extern and static.
Literals
ofstream
Default memberwise assignment
register
21. A pointer is a variable that contains as its value the____________ of another variable.
address
base class
operator
case sensitive
22. The ________ program combines the output of the compiler with various library functions to produce an executable image.
#include directive
token
linker
searching
23. The _________ begins the body of every function and the _________ ends the body of every function.
base
{ }
preprocessor
#include <headerfilename>
24. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
const datatype identifier = value
void
#include <headerfilename>
25. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
function parameters
local variable
classes
function scope
26. This manipulator is used to establish a field width for the value immediately following it.
allocating memory
function parameters
setw
void
27. data types that refer to numbers with decimals
floating-point
strcpy()
classes
case sensitive
28. A type of pointer that can point at objects of any data type.
named constant
virtual functions
*
void pointer
29. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
derived class
integer operands
assignment statement
function scope
30. The three values that can be used to initialize a pointer are 0 - __________ and an address.
base class
strcpy()
NULL
heap
31. An expression that has operands with different data types
delete
function call
mixed expression
pointer
32. Operator with only one operand
scope
special symbols
unary operator
recursive
33. Lists and tables of values can be stored in arrays or __________.
function parameters
vectors
template
syntax
34. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
&
base
void
searching
35. Member objects are constructed __________ their enclosing class object.
before
globals
special symbols
showpoint
36. Identifier or expression that is part of the calculation to be performed
.cpp
#include
operand value
address
37. tab
t
&
non-static
{ }
38. C++ programs are normally typed into a computer using a(n) ________ program.
classes
editor
beginning
auto
39. Associate an identifier with a memory location
unary operator
if
ofstream
allocating memory
40. The sign you use for references
&
source file
{ }
main
41. = & | are examples of ____________.
loader
opened
n
special symbols
42. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
access specifier
function scope
preprocessor
43. The modulus operator (%) can be used only with __________.
break
derived class
delete
integer operands
44. Repeating a set of instructions a specific number of times is called_________repetition.
base class
Counter-controlled or definite
this
reserved words
45. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
non-static
semantics
cin.get(ch)
operator overloading
46. An expression in which all operands have the same data type - result will have the same data type as operands
strcpy()
default constructor
like-type expression
n
47. If a member initializer is not provided for a member object of a class the object's __________ is called.
base
virtual functions
associations
default constructor
48. To explicitly indicate that a value is to be converted to another type
vectors
const
cin
type casting (conversion)
49. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
*
definition
linker
switch
50. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
recursive
if...else
continue
this