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. = & | are examples of ____________.
switch
operator
type coercion
special symbols
2. Classes can have relationships with other classes. These relationships are called ________.
public
inline functions
associations
srand
3. A function that calls itself
Counter-controlled or definite
object file
recursive function
switch
4. Used to qualify hidden names so that they can be used.
member
definition
object file
scope resolution operator
5. A human readable file that contains C++ program
special symbols
token
::
source file
6. A variable declared outside any block or function is a ________ variable.
recursive
linker
global
arithmetic expression
7. If a member initializer is not provided for a member object of a class the object's __________ is called.
inline functions
switch
globals
default constructor
8. Use 2 characters to represent one
object file
function overloading
escape sequences
derived class
9. The modulus operator (%) can be used only with __________.
integer operands
dot (.)
associations
void pointer
10. The __________ operator reclaims memory previously allocated by new.
function call
definition
polymorphism
delete
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.
#include
local variable
static
.cpp
12. Compares two strings and returns 0 if they are equal.
operand value
two-dimensional
strcmp()
static_cast<char>(65)
13. In inheritance the ____________ is the class that supplies the inherited members.
cin.get(ch)
strcmp()
floating-point
base class
14. Used for dynamically allocated variables
heap
Stack overflow
Sentinel
register
15. Sets floating-point values to a fixed decimal format
>>
inheritance
fixed
friend
16. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
semicolon
fixed
linker
token
17. The symbol for the binary scope resolution operator
type coercion
Arithmetic Operators
cin
::
18. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
const
operand value
semantics
>>
19. tab
globals
t
syntax
% modulus
20. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
local variable
this
#include directive
21. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
Stack overflow
searching
main
pointer
22. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
function parameters
Unified Modeling Language(UML)
identifiers
void
23. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
preprocessor
derived class
return
24. Every C++ statement ends with a(n) _________.
static
address
semicolon
private
25. 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.
Literals
polymorphism
virtual functions
binary operator
26. Whole numbers - no decimals and no commas included
.cpp
int values
this
cin >> variable
27. Associate an identifier with a memory location
named constant
allocating memory
case sensitive
polymorphism
28. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
constant variable
new line
static
globals
29. Function ________ is used to produce random numbers.
global
function scope
cin >> variable
rand
30. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
allocating memory
globals
friend
Literals
31. The _________ begins the body of every function and the _________ ends the body of every function.
before
{ }
strcmp()
whitespace
32. Member objects are constructed __________ their enclosing class object.
static
srand
before
whitespace
33. The ________ statement in a called function passes the value of an expression back to the calling function.
return
case sensitive
selection
main
34. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
35. To write data to a file you define an object of which one of the following
a.out
ofstream
return
template
36. A C++ statement that makes a decision is ______.
getline
<<
loader
if
37. This manipulator is used to establish a field width for the value immediately following it.
setw
if...else
srand
#include directive
38. directive A statement that starts with a # is called a ____________.
.cpp
Preprocessor
assignment
continue
39. The _____ causes the contents of another file to be inserted into a program.
arithmetic expression
#include directive
endl (same as 'n')
scope
40. Identifier or expression that is part of the calculation to be performed
#include <headerfilename>
dot (.)
cout
operand value
41. Allows the programmer to store a value in a variable
setw
assignment statement
.cpp
classes
42. This is used to mark the end of a complete C++ programming statement.
>>
assignment
Semicolon
friend
43. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
n
recursive
stack
44. The number used to refer to a particular element of an array is called its ________.
n
subscript (or index)
variables
public
45. The ________ program combines the output of the compiler with various library functions to produce an executable image.
return
reserved words
subscript (or index)
linker
46. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
globals
/n
Literals
selection
47. Two slash marks ( // ) indicate __________ of a comment
dot (.)
floating-point
#include <headerfilename>
beginning
48. A sequence of operands and operators that describe a calculation to be performed
semicolon
default constructor
whitespace
arithmetic expression
49. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
cin >> variable
/n
selection
50. Header file that contains commonly performed mathematical functions
attributes
cmath
derived class
syntax