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. A human readable file that contains C++ program
two-dimensional
source file
type coercion
identifiers
2. * / % + -
inline functions
Arithmetic Operators
polymorphism
showpoint
3. Default name of executable file
mixed expression
like-type expression
local variable
a.out
4. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
constant variable
strlen()
before
const
5. A type of pointer that can point at objects of any data type.
void pointer
&
searching
public
6. The idea that you can call the same function and the output will depend on the type of object you're using.
void
int values
pointer
polymorphism
7. To allow file access in a program you must #include this header file.
fstream
Closing brace
cin.get(ch)
strlen()
8. The stream insertion operator
<<
loader
cout
static
9. A memory location with a name and data type - its content may be changed during program execution
variable
floating-point
inheritance
strcmp()
10. Message displayed to the screen asking user for input; generated with an output statement
type
prompt
&
allocating memory
11. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
dot (.)
void
#include directive
object-oriented analysis and design (OOAD)
12. Two slash marks ( // ) indicate __________ of a comment
Unified Modeling Language(UML)
token
base
beginning
13. The symbol for the binary scope resolution operator
prompt
switch
integer operands
::
14. The __________ operator reclaims memory previously allocated by new.
delete
function prototype
pointer
function call
15. Operator with only one operand
reserve words
unary operator
access specifier
initialized
16. Every C++ program begins execution at the function _________.
like-type expression
semantics
cout
main
17. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
constant variable
linker
cin >> variable
18. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
% modulus
associations
recursive function
19. 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
data type
a.out
base
#include <headerfilename>
20. A variable declared outside any block or function is a ________ variable.
global
continue
#include directive
srand
21. Use 2 characters to represent one
escape sequences
#include
break
default constructor
22. The ________ enables access to a global variable with the same name as a variable in the current scope.
.cpp
arithmetic expression
searching
unary scope resolution operator (::)
23. int namespace include using return examples of ___________
opened
reserve words
definition
continue
24. A variable that is known only within the function in which it is defined is called a ________.
before
>>
overloading
local variable
25. The storage-class specifiers are mutable - auto - ________ - extern and static.
escape sequences
rand
register
0
26. C++ programs are normally typed into a computer using a(n) ________ program.
editor
>>
pointer
char
27. An expression in which all operands have the same data type - result will have the same data type as operands
function scope
friend
special symbols
like-type expression
28. Compares two strings and returns 0 if they are equal.
attributes
strcmp()
void pointer
type coercion
29. The ________ program transfers the executable image of a C++ program from disk to memory.
operator overloading
selection
loader
non-static
30. Member objects are constructed __________ their enclosing class object.
auto
derived class
vectors
before
31. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
#include <headerfilename>
static
setw
32. Preprocessor directive syntax
reserve words
#include <headerfilename>
void pointer
function prototype
33. If a member initializer is not provided for a member object of a class the object's __________ is called.
stack
default constructor
Stack overflow
classes
34. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
before
function overloading
char
?
35. The modulus operator (%) can be used only with __________.
associations
arithmetic expression
integer operands
#include <headerfilename>
36. The process of placing the elements of an array in order is called ________ the array.
object-oriented analysis and design (OOAD)
sorting
{ }
left
37. This is used to mark the end of a complete C++ programming statement.
cin.get(ch)
associations
local variable
Semicolon
38. Executable version of program
globals
object file
identifiers
assignment
39. Creates a copy of a string.
function call
information hiding
strcpy()
unary scope resolution operator (::)
40. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
strcmp()
cin >> variable
?
before
41. 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.
virtual functions
inline functions
int values
base
42. Returns the length of a string excluding the null terminator.
void pointer
strlen()
recursive function
semicolon
43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
before
function call
strlen()
44. data types that refer to numbers with decimals
floating-point
pointer
type casting (conversion)
main
45. Keyword public is a(n) _________
void
scope
break
access specifier
46. The number used to refer to a particular element of an array is called its ________.
void pointer
identifiers
subscript (or index)
heap
47. A sequence of operands and operators that describe a calculation to be performed
/n
polymorphism
token
arithmetic expression
48. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
cmath
function overloading
member
49. A filestream variable that represents the default output device
non-static
cout
unary scope resolution operator (::)
special symbols
50. 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.
address
Sentinel
friend
reserved words