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. __________ can be used to assign an object of a class to another object of the same class.
case sensitive
before
Default memberwise assignment
floating-point
2. Executable version of program
pointer
object file
variables
srand
3. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
setw
special symbols
function call
recursive
4. For every opening brace in a C++ program there must be a ______________.
Closing brace
operand value
escape sequences
identifiers
5. Use 2 characters to represent one
switch
arithmetic expression
% modulus
escape sequences
6. Lists and tables of values can be stored in arrays or __________.
.cpp
void
associations
vectors
7. Most calculations are normally performed by ______ statements.
assignment
*
associations
assignment statement
8. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
comments
cmath
definition
9. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
classes
register
Semicolon
10. The size & shape & color and weight of an object are considered
attributes
continue
variables
NULL
11. Whole numbers - no decimals and no commas included
whitespace
break
variables
int values
12. Class members specified as _________ are accessible anywhere an object of the class is in scope.
token
polymorphism
public
const
13. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
prompt
stack
rand
globals
14. The stream extraction operator
function call
polymorphism
&
>>
15. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
arithmetic expression
function scope
virtual functions
void pointer
16. C++ programs are normally typed into a computer using a(n) ________ program.
endl (same as 'n')
editor
address
linker
17. directive A statement that starts with a # is called a ____________.
Preprocessor
pointer
left
operator overloading
18. The ________ program combines the output of the compiler with various library functions to produce an executable image.
int values
Default memberwise assignment
assignment
linker
19. A function ________ enables a single function to be defined to perform a task on many different data types.
const
template
void pointer
scope
20. All ______ must be declared before they are used.
cin >> variable
reserved words
base
variables
21. Sets floating-point values to a fixed decimal format
searching
reserve words
fixed
whitespace
22. A variable that holds the address of another variable.
register
Counter-controlled or definite
reserved words
pointer
23. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
editor
classes
char
24. Returns the length of a string excluding the null terminator.
preprocessor
named constant
&
strlen()
25. A function that calls itself
void
reserved words
recursive function
linker
26. tab
t
cin >> variable
classes
definition
27. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
base
local variable
Stack overflow
switch
28. The idea that you can call the same function and the output will depend on the type of object you're using.
named constant
inline functions
sorting
polymorphism
29. Message displayed to the screen asking user for input; generated with an output statement
prompt
type
type casting (conversion)
member
30. The ________ of an identifier is the portion of the program in which the identifier can be used.
endl (same as 'n')
template
scope
t
31. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
0
function overloading
comments
32. The __________ operator reclaims memory previously allocated by new.
delete
endl (same as 'n')
searching
non-static
33. The modulus operator (%) can be used only with __________.
integer operands
static_cast<char>(65)
strcmp()
unary scope resolution operator (::)
34. A memory location with a name and data type - its content may be changed during program execution
stack
syntax
variable
comments
35. The ________ qualifier is used to declare read-only variables.
showpoint
::
const
virtual functions
36. A constant object must be __________; it cannot be modified after it is created.
initialized
static
integer operands
arithmetic expression
37. Associate an identifier with a memory location
function parameters
two-dimensional
allocating memory
cin.get(ch)
38. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
polymorphism
Preprocessor
Sentinel
special symbols
39. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
scope resolution operator
void
getline
40. The symbol for the binary scope resolution operator
const
Stack overflow
if
::
41. The process of determining if an array contains a particular key value is called _________ the array.
address
operator
searching
Stack overflow
42. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
cin.get(ch)
Closing brace
/n
char
43. These are data items whose values do not change while the program is running
function parameters
sorting
dot (.)
Literals
44. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
type
getline
Unified Modeling Language(UML)
information hiding
45. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
escape sequences
return
assignment statement
new line
46. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
base class
semantics
whitespace
break
47. Repeating a set of instructions a specific number of times is called_________repetition.
#include <headerfilename>
::
Counter-controlled or definite
static
48. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
Literals
editor
Default memberwise assignment
49. The address-of operator. it is used to assign pointers and to print the address of variables.
&
return
attributes
#include directive
50. A member function should be declared static if it does not access __________ class members.
Arithmetic Operators
auto
Preprocessor
non-static