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 pointer is a variable that contains as its value the____________ of another variable.
allocating memory
function prototype
opened
address
2. 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.
?
Counter-controlled or definite
polymorphism
derived class
3. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
token
cin.get(ch)
pointer
new line
4. In inheritance the ____________ is the class the receives the inherited members.
main
derived class
pointer
void
5. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
cout
cin >> variable
syntax
6. 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.
strcpy()
classes
const
dot (.)
7. A function is invoked with a ________.
function call
type
initialized
whitespace
8. A sequence of operands and operators that describe a calculation to be performed
non-static
sorting
NULL
arithmetic expression
9. In inheritance the ____________ is the class that supplies the inherited members.
base class
data type
% modulus
vectors
10. Symbol that denotes an action to be performed
void
selection
operator
searching
11. Returns the length of a string excluding the null terminator.
type coercion
named constant
strlen()
recursive
12. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
dot (.)
endl (same as 'n')
selection
object-oriented analysis and design (OOAD)
13. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
NULL
arithmetic expression
static
operator overloading
14. The process of analyzing and designing a system from an object-oriented point of view is called ________.
Counter-controlled or definite
address
const datatype identifier = value
object-oriented analysis and design (OOAD)
15. Used for function calls and local variables
Preprocessor
stack
break
delete
16. The sign you use for references
reserved words
type coercion
&
dot (.)
17. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
type coercion
token
template
function prototype
18. A variable declared outside any block or function is a ________ variable.
void
unary operator
global
semicolon
19. Type casting syntax
static_cast<char>(65)
like-type expression
unary scope resolution operator (::)
main
20. = & | are examples of ____________.
inline functions
Semicolon
void
special symbols
21. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
pointer
Stack overflow
source file
variables
22. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
vectors
{ }
global
friend
23. Identifier or expression that is part of the calculation to be performed
default constructor
a.out
return
operand value
24. Initializers __________ must be used to initialize constant members of a class.
variables
member
classes
function scope
25. Preprocessor directive syntax
#include
overloading
Counter-controlled or definite
#include <headerfilename>
26. The ________ program combines the output of the compiler with various library functions to produce an executable image.
a.out
main
switch
linker
27. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
Counter-controlled or definite
break
//
constant variable
28. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
template
endl (same as 'n')
Literals
inline functions
29. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
floating-point
preprocessor
binary operator
30. All ______ must be declared before they are used.
variables
&
{ }
#include
31. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
strcmp()
Unified Modeling Language(UML)
ofstream
&
32. Operator with only one operand
base class
unary operator
static_cast<char>(65)
const
33. An array that uses two subscripts is referred to as a(n) _________ array.
attributes
two-dimensional
void
Arithmetic Operators
34. Most calculations are normally performed by ______ statements.
access specifier
assignment
continue
Sentinel
35. An operator that can only be used with int values. result will always be an int.
% modulus
template
attributes
scope
36. Message displayed to the screen asking user for input; generated with an output statement
whitespace
prompt
Default memberwise assignment
strlen()
37. A program that finds and attaches to your program the indicated libraries for compilation
/n
preprocessor
polymorphism
Semicolon
38. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
globals
a.out
static
::
39. Associate an identifier with a memory location
allocating memory
showpoint
binary operator
before
40. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
object file
binary operator
variable
41. A function that calls itself
recursive function
object-oriented analysis and design (OOAD)
dot (.)
setw
42. The ________ statement in a called function passes the value of an expression back to the calling function.
overloading
left
*
return
43. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
base
.cpp
/n
44. int namespace include using return examples of ___________
unary scope resolution operator (::)
NULL
reserve words
non-static
45. Names of things that are used in a program - can apply to variables & constants and functions
#include directive
case sensitive
public
identifiers
46. The size & shape & color and weight of an object are considered
break
function parameters
friend
attributes
47. 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.
::
definition
editor
information hiding
48. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
source file
void pointer
pointer
variables
49. The only integer that can be assigned directly to a pointer is_____________.
a.out
0
switch
unary operator
50. This manipulator is used to establish a field width for the value immediately following it.
{ }
setw
classes
NULL