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. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
if
new line
preprocessor
recursive function
2. A member function should be declared static if it does not access __________ class members.
whitespace
srand
int values
non-static
3. Every C++ statement ends with a(n) _________.
semicolon
derived class
<<
fstream
4. 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.
overloading
.cpp
token
dot (.)
5. Message displayed to the screen asking user for input; generated with an output statement
.cpp
main
prompt
classes
6. A pointer is a variable that contains as its value the____________ of another variable.
address
named constant
strcmp()
const
7. The ________ program combines the output of the compiler with various library functions to produce an executable image.
mixed expression
linker
Sentinel
unary scope resolution operator (::)
8. Header file that contains commonly performed mathematical functions
Arithmetic Operators
srand
{ }
cmath
9. Characters used to separate symbols or reserved words or identifiers and statements
function call
associations
mixed expression
whitespace
10. A human readable file that contains C++ program
cin.get(ch)
t
operator
source file
11. A variable declared outside any block or function is a ________ variable.
loader
cout
function overloading
global
12. An expression that has operands with different data types
getline
delete
semantics
mixed expression
13. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
endl (same as 'n')
recursive
getline
Sentinel
14. Use 2 characters to represent one
function prototype
escape sequences
friend
derived class
15. 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.
pointer
case sensitive
stack
information hiding
16. A variable that holds the address of another variable.
static
member
pointer
sorting
17. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
a.out
strlen()
return
Stack overflow
18. The symbol for the binary scope resolution operator
% modulus
void
::
variable
19. Sets floating-point values to a fixed decimal format
fixed
&
<<
global
20. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
binary operator
this
sorting
21. Lists and tables of values can be stored in arrays or __________.
vectors
prompt
switch
//
22. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
//
cin >> variable
opened
source file
23. The ________ statement in a called function passes the value of an expression back to the calling function.
associations
0
default constructor
return
24. You must have a ___________ for every variable you intend to use in a program
preprocessor
definition
const datatype identifier = value
dot (.)
25. A variable that is known only within the function in which it is defined is called a ________.
&
mixed expression
local variable
pointer
26. The storage-class specifiers are mutable - auto - ________ - extern and static.
function call
searching
register
comments
27. The process of determining if an array contains a particular key value is called _________ the array.
loader
searching
reserved words
pointer
28. __________ can be used to assign an object of a class to another object of the same class.
polymorphism
cout
Default memberwise assignment
access specifier
29. In inheritance the ____________ is the class the receives the inherited members.
loader
derived class
opened
.cpp
30. The three values that can be used to initialize a pointer are 0 - __________ and an address.
object file
type coercion
continue
NULL
31. A set of values together with a set of operations
data type
attributes
inline functions
information hiding
32. To explicitly indicate that a value is to be converted to another type
local variable
inheritance
type casting (conversion)
public
33. Identifier or expression that is part of the calculation to be performed
if...else
Literals
operand value
preprocessor
34. Allows the programmer to store a value in a variable
&
default constructor
int values
assignment statement
35. For every opening brace in a C++ program there must be a ______________.
vectors
Closing brace
scope
//
36. The ________ program transfers the executable image of a C++ program from disk to memory.
data type
loader
recursive
classes
37. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
global
selection
Sentinel
initialized
38. * / % + -
function prototype
/n
Arithmetic Operators
type casting (conversion)
39. tab
register
const datatype identifier = value
t
if
40. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
static
Semicolon
token
classes
41. A function that can be used to read character data including whitespace
recursive
if...else
cin.get(ch)
static_cast<char>(65)
42. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
switch
::
overloading
cin >> variable
43. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
data type
private
Sentinel
unary scope resolution operator (::)
44. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
#include
named constant
void
function parameters
45. A filestream variable that represents the default output device
n
cin.get(ch)
before
cout
46. 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
globals
NULL
base
//
47. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
*
switch
{ }
Counter-controlled or definite
48. An array that uses two subscripts is referred to as a(n) _________ array.
?
escape sequences
semicolon
two-dimensional
49. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
static
char
base class
50. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
*
scope
#include directive