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. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
const datatype identifier = value
&
function scope
overloading
2. This manipulator causes the field to be left-justified with padding spaces printed to the right.
attributes
const datatype identifier = value
left
cin
3. Whole numbers - no decimals and no commas included
this
int values
public
>>
4. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
0
main
getline
::
5. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
preprocessor
Unified Modeling Language(UML)
strcpy()
char
6. A function that can be used to read character data including whitespace
reserve words
cin.get(ch)
int values
public
7. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
&
operator overloading
*
unary scope resolution operator (::)
8. The ________ program combines the output of the compiler with various library functions to produce an executable image.
Arithmetic Operators
mixed expression
/n
linker
9. An operator that can only be used with int values. result will always be an int.
function call
Semicolon
mixed expression
% modulus
10. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
whitespace
?
non-static
assignment
11. Header file that contains commonly performed mathematical functions
cmath
register
Default memberwise assignment
new line
12. 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
friend
base
information hiding
inline functions
13. Returns the length of a string excluding the null terminator.
::
friend
strlen()
variables
14. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
srand
strlen()
void pointer
15. Two slash marks ( // ) indicate __________ of a comment
srand
Counter-controlled or definite
fixed
beginning
16. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
NULL
recursive
polymorphism
initialized
17. The sign you use for pointers
break
semicolon
assignment statement
*
18. You can declare default values for a function in the ____________________.
return
function parameters
type casting (conversion)
object file
19. The symbol for the binary scope resolution operator
global
::
Closing brace
ofstream
20. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
endl (same as 'n')
fixed
beginning
private
21. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
&
member
stack
22. Creates a copy of a string.
cin >> variable
object-oriented analysis and design (OOAD)
strcpy()
type coercion
23. Operator with only one operand
n
public
unary operator
&
24. In inheritance the ____________ is the class that supplies the inherited members.
base class
allocating memory
attributes
local variable
25. = & | are examples of ____________.
t
Semicolon
<<
special symbols
26. All C++ Variables are_________.
dot (.)
selection
operator overloading
case sensitive
27. The size & shape & color and weight of an object are considered
attributes
function overloading
pointer
left
28. Sets floating-point values to a fixed decimal format
endl (same as 'n')
fixed
non-static
member
29. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
break
globals
unary operator
new line
30. Preprocessor directive syntax
Arithmetic Operators
variable
type coercion
#include <headerfilename>
31. This manipulator is used to establish a field width for the value immediately following it.
setw
public
void pointer
overloading
32. Executable version of program
object file
linker
polymorphism
arithmetic expression
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
#include
return
derived class
34. A sequence of operands and operators that describe a calculation to be performed
variable
Literals
arithmetic expression
address
35. Used for function calls and local variables
inheritance
*
auto
stack
36. The process of placing the elements of an array in order is called ________ the array.
editor
register
sorting
heap
37. Function ________ is used to set the random number seed to randomize a program.
globals
&
srand
classes
38. These are data items whose values do not change while the program is running
before
integer operands
semantics
Literals
39. A function is invoked with a ________.
function call
strcpy()
global
&
40. __________ can be used to assign an object of a class to another object of the same class.
fstream
global
Default memberwise assignment
const datatype identifier = value
41. Nonexecutable statements that are included in a program to provide information about what the program does etc.
preprocessor
non-static
function call
comments
42. The ________ qualifier is used to declare read-only variables.
break
virtual functions
const
sorting
43. All ______ must be declared before they are used.
unary operator
showpoint
variables
recursive function
44. A filestream variable that represents the default output device
cout
void
reserved words
scope
45. data types that refer to numbers with decimals
attributes
variables
function call
floating-point
46. An expression that has operands with different data types
template
mixed expression
*
binary operator
47. When a value of one data type is implicitly (automatically) changed to another data type
getline
Semicolon
before
type coercion
48. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
preprocessor
address
delete
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
0
break
Arithmetic Operators
cin
50. Compares two strings and returns 0 if they are equal.
derived class
default constructor
.cpp
strcmp()