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. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
virtual functions
function overloading
type
//
2. Default name of executable file
comments
public
a.out
overloading
3. A function is invoked with a ________.
<<
function call
like-type expression
strcmp()
4. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
selection
const
inline functions
::
5. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
switch
const
Stack overflow
6. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
new line
main
Arithmetic Operators
operator overloading
7. 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.
whitespace
inheritance
cin >> variable
left
8. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
inline functions
Semicolon
reserve words
9. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
&
const
void
derived class
10. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
token
semantics
beginning
sorting
11. The size & shape & color and weight of an object are considered
cin
scope
delete
attributes
12. Keyword public is a(n) _________
access specifier
return
main
type coercion
13. A file must be ________ before data can be written to or read from it.
ofstream
switch
function prototype
opened
14. The ________ program transfers the executable image of a C++ program from disk to memory.
void pointer
rand
virtual functions
loader
15. This manipulator is used to establish a field width for the value immediately following it.
setw
Arithmetic Operators
strlen()
definition
16. All ______ must be declared before they are used.
recursive function
private
variables
#include <headerfilename>
17. An expression in which all operands have the same data type - result will have the same data type as operands
address
like-type expression
function parameters
const
18. 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
access specifier
base
register
address
19. Associate an identifier with a memory location
&
allocating memory
switch
Unified Modeling Language(UML)
20. Type casting syntax
preprocessor
&
static_cast<char>(65)
attributes
21. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
void
if...else
attributes
access specifier
22. Program components in C++ are called functions and ________.
/n
getline
t
classes
23. C++ programs are normally typed into a computer using a(n) ________ program.
variable
identifiers
editor
operand value
24. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
Closing brace
new line
inline functions
reserve words
25. The sign you use for references
token
&
information hiding
mixed expression
26. * / % + -
default constructor
reserve words
function scope
Arithmetic Operators
27. Naming convention for C++ programs
t
&
.cpp
beginning
28. This manipulator causes the field to be left-justified with padding spaces printed to the right.
t
left
% modulus
cout
29. A constant object must be __________; it cannot be modified after it is created.
showpoint
access specifier
initialized
base class
30. This is used to mark the end of a complete C++ programming statement.
constant variable
polymorphism
void
Semicolon
31. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
recursive function
object file
return
void
32. int namespace include using return examples of ___________
Closing brace
operator overloading
reserve words
.cpp
33. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
fixed
stack
preprocessor
34. A member function should be declared static if it does not access __________ class members.
non-static
srand
address
this
35. 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.
#include <headerfilename>
?
prompt
static_cast<char>(65)
36. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
whitespace
reserved words
comments
break
37. A sequence of operands and operators that describe a calculation to be performed
const datatype identifier = value
arithmetic expression
definition
cin >> variable
38. These are data items whose values do not change while the program is running
rand
Literals
editor
object-oriented analysis and design (OOAD)
39. Used for dynamically allocated variables
subscript (or index)
beginning
global
heap
40. Two slash marks ( // ) indicate __________ of a comment
base
scope
strcmp()
beginning
41. The ________ program combines the output of the compiler with various library functions to produce an executable image.
static
loader
linker
global
42. You can declare default values for a function in the ____________________.
*
function parameters
Unified Modeling Language(UML)
information hiding
43. Classes can have relationships with other classes. These relationships are called ________.
#include directive
t
associations
initialized
44. Operator with only one operand
continue
data type
unary operator
polymorphism
45. The _____ causes the contents of another file to be inserted into a program.
virtual functions
operator
return
#include directive
46. __________ can be used to assign an object of a class to another object of the same class.
continue
auto
prompt
Default memberwise assignment
47. The elements of an array are related by the fact that they have the same name and ___________.
<<
const
type
const
48. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
type
token
private
showpoint
49. Used to qualify hidden names so that they can be used.
#include <headerfilename>
beginning
scope resolution operator
non-static
50. The process of placing the elements of an array in order is called ________ the array.
sorting
?
cout
pointer