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. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
srand
operator overloading
preprocessor
private
2. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
object file
Preprocessor
inline functions
char
3. Every C++ statement ends with a(n) _________.
showpoint
semicolon
Stack overflow
Preprocessor
4. Function ________ is used to set the random number seed to randomize a program.
srand
public
endl (same as 'n')
semicolon
5. To write data to a file you define an object of which one of the following
classes
void
associations
ofstream
6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
char
NULL
function scope
return
7. 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.
% modulus
?
type
cout
8. Characters used to separate symbols or reserved words or identifiers and statements
heap
case sensitive
attributes
whitespace
9. int namespace include using return examples of ___________
break
object file
Semicolon
reserve words
10. This manipulator causes the field to be left-justified with padding spaces printed to the right.
preprocessor
friend
left
setw
11. Symbol that denotes an action to be performed
operator
scope resolution operator
inheritance
fixed
12. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
*
selection
named constant
13. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
Unified Modeling Language(UML)
<<
selection
mixed expression
14. 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.
cin >> variable
type
identifiers
Sentinel
15. 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
strcpy()
case sensitive
base
Arithmetic Operators
16. Member objects are constructed __________ their enclosing class object.
before
address
function prototype
t
17. The ________ of an identifier is the portion of the program in which the identifier can be used.
classes
function call
Sentinel
scope
18. Identifier or expression that is part of the calculation to be performed
two-dimensional
member
subscript (or index)
operand value
19. A filestream variable that represents the default input source
static
before
whitespace
cin
20. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
selection
return
virtual functions
subscript (or index)
21. = & | are examples of ____________.
special symbols
allocating memory
source file
friend
22. 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.
initialized
delete
//
void
23. Used for dynamically allocated variables
heap
unary operator
strcmp()
default constructor
24. The ________ qualifier is used to declare read-only variables.
const
void pointer
before
operand value
25. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
function overloading
assignment statement
left
26. The ________ statement in a called function passes the value of an expression back to the calling function.
return
friend
&
function overloading
27. The address-of operator. it is used to assign pointers and to print the address of variables.
operand value
const
&
linker
28. Function ________ is used to produce random numbers.
type coercion
rand
void
register
29. The number used to refer to a particular element of an array is called its ________.
delete
n
subscript (or index)
?
30. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
strlen()
void
inline functions
heap
31. This is used to mark the end of a complete C++ programming statement.
::
Semicolon
data type
if
32. The stream insertion operator
void
data type
<<
if
33. These are data items whose values do not change while the program is running
local variable
const
Literals
attributes
34. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
editor
binary operator
void
semicolon
35. Message displayed to the screen asking user for input; generated with an output statement
getline
variable
NULL
prompt
36. The only integer that can be assigned directly to a pointer is_____________.
Closing brace
object-oriented analysis and design (OOAD)
escape sequences
0
37. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
preprocessor
function overloading
pointer
associations
38. * / % + -
constant variable
#include
Arithmetic Operators
const
39. A variable that is known only within the function in which it is defined is called a ________.
left
showpoint
local variable
#include directive
40. Initializers __________ must be used to initialize constant members of a class.
pointer
const datatype identifier = value
<<
member
41. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
floating-point
Default memberwise assignment
operator overloading
42. A variable declared outside any block or function is a ________ variable.
*
initialized
object-oriented analysis and design (OOAD)
global
43. Words that are used for special purposes in a program
reserve words
*
reserved words
Arithmetic Operators
44. Header file that contains commonly performed mathematical functions
strcmp()
subscript (or index)
data type
cmath
45. directive A statement that starts with a # is called a ____________.
break
Preprocessor
semicolon
mixed expression
46. Most calculations are normally performed by ______ statements.
assignment
function prototype
cout
escape sequences
47. Naming convention for C++ programs
classes
syntax
.cpp
register
48. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
searching
heap
function prototype
semicolon
49. Use 2 characters to represent one
const
unary operator
type casting (conversion)
escape sequences
50. The stream extraction operator
static
strcpy()
>>
?