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. Used to qualify hidden names so that they can be used.
endl (same as 'n')
Stack overflow
scope resolution operator
type casting (conversion)
2. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
left
static
new line
derived class
3. Allows the programmer to store a value in a variable
two-dimensional
assignment statement
rand
auto
4. Most calculations are normally performed by ______ statements.
case sensitive
const
a.out
assignment
5. Naming convention for C++ programs
pointer
void
.cpp
classes
6. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
this
recursive function
initialized
7. Words that are used for special purposes in a program
initialized
associations
showpoint
reserved words
8. The sign you use for references
operand value
base class
&
attributes
9. data types that refer to numbers with decimals
void
this
int values
floating-point
10. An expression that has operands with different data types
mixed expression
dot (.)
this
#include <headerfilename>
11. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
showpoint
strlen()
auto
operand value
12. A ________ program executes before the compiler's translation phase begins.
preprocessor
operator
static_cast<char>(65)
access specifier
13. A human readable file that contains C++ program
left
delete
source file
default constructor
14. Classes can have relationships with other classes. These relationships are called ________.
dot (.)
associations
allocating memory
vectors
15. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
sorting
friend
#include <headerfilename>
global
16. A function is invoked with a ________.
overloading
function call
named constant
a.out
17. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
two-dimensional
strlen()
% modulus
18. A C++ statement that makes a decision is ______.
whitespace
if
register
overloading
19. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
public
switch
delete
//
20. Symbol that denotes an action to be performed
left
delete
operator
{ }
21. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
public
setw
n
globals
22. An expression in which all operands have the same data type - result will have the same data type as operands
Arithmetic Operators
like-type expression
vectors
initialized
23. tab
subscript (or index)
before
t
getline
24. A member function should be declared static if it does not access __________ class members.
data type
base class
ofstream
non-static
25. A file must be ________ before data can be written to or read from it.
return
opened
0
.cpp
26. Lists and tables of values can be stored in arrays or __________.
object file
&
int values
vectors
27. A function ________ enables a single function to be defined to perform a task on many different data types.
char
base class
semicolon
template
28. A type of pointer that can point at objects of any data type.
heap
preprocessor
void pointer
source file
29. C++ programs are normally typed into a computer using a(n) ________ program.
binary operator
editor
ofstream
#include
30. The symbol for the binary scope resolution operator
this
template
::
virtual functions
31. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
strcpy()
object-oriented analysis and design (OOAD)
semantics
cin >> variable
32. The ________ program transfers the executable image of a C++ program from disk to memory.
void
type casting (conversion)
initialized
loader
33. 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.
fstream
virtual functions
showpoint
switch
34. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
binary operator
return
main
register
35. The ________ qualifier is used to declare read-only variables.
const
endl (same as 'n')
base
<<
36. Syntax for named constant declaration
const datatype identifier = value
searching
named constant
#include directive
37. When a value of one data type is implicitly (automatically) changed to another data type
Preprocessor
main
type coercion
strcmp()
38. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
linker
information hiding
heap
Arithmetic Operators
39. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
&
void
arithmetic expression
recursive
40. Used for function calls and local variables
&
Stack overflow
polymorphism
stack
41. = & | are examples of ____________.
Unified Modeling Language(UML)
variable
Semicolon
special symbols
42. The sign you use for pointers
strcmp()
cout
*
//
43. Header file that contains commonly performed mathematical functions
pointer
cmath
Preprocessor
a.out
44. Two slash marks ( // ) indicate __________ of a comment
::
0
showpoint
beginning
45. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
if...else
switch
#include
private
46. Sets floating-point values to a fixed decimal format
case sensitive
fixed
pointer
recursive
47. The elements of an array are related by the fact that they have the same name and ___________.
classes
type
pointer
prompt
48. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
classes
data type
break
overloading
49. A function that calls itself
*
recursive function
stack
escape sequences
50. Every C++ program begins execution at the function _________.
main
whitespace
beginning
constant variable