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. Preprocessor directive syntax
fstream
#include <headerfilename>
base class
local variable
2. The _____ causes the contents of another file to be inserted into a program.
overloading
#include directive
floating-point
int values
3. An array that uses two subscripts is referred to as a(n) _________ array.
private
two-dimensional
function parameters
case sensitive
4. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
register
selection
access specifier
vectors
5. An expression that has operands with different data types
.cpp
base
mixed expression
two-dimensional
6. Member objects are constructed __________ their enclosing class object.
definition
<<
before
friend
7. The process of determining if an array contains a particular key value is called _________ the array.
base class
static_cast<char>(65)
searching
function call
8. The modulus operator (%) can be used only with __________.
recursive function
integer operands
getline
function parameters
9. An expression in which all operands have the same data type - result will have the same data type as operands
static_cast<char>(65)
operator
void
like-type expression
10. This manipulator causes the field to be left-justified with padding spaces printed to the right.
function prototype
cin.get(ch)
strcpy()
left
11. A memory location with a name and data type - its content may be changed during program execution
variable
void pointer
operand value
static
12. The process of placing the elements of an array in order is called ________ the array.
sorting
#include
char
polymorphism
13. Characters used to separate symbols or reserved words or identifiers and statements
allocating memory
//
whitespace
token
14. 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.
integer operands
?
Preprocessor
friend
15. A __________ should be used to declare the size of an array because it makes the program more scalable.
searching
?
constant variable
register
16. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
void
a.out
Closing brace
17. A sequence of operands and operators that describe a calculation to be performed
sorting
member
0
arithmetic expression
18. 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
preprocessor
new line
source file
19. Use 2 characters to represent one
escape sequences
stack
strcpy()
rand
20. A C++ statement that makes a decision is ______.
delete
assignment statement
if
member
21. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
cin
new line
globals
editor
22. The number used to refer to a particular element of an array is called its ________.
preprocessor
?
function parameters
subscript (or index)
23. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
getline
vectors
break
sorting
24. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
sorting
register
void
Semicolon
25. Naming convention for C++ programs
left
.cpp
semantics
local variable
26. Associate an identifier with a memory location
a.out
allocating memory
reserve words
before
27. data types that refer to numbers with decimals
syntax
definition
floating-point
semicolon
28. newline
rand
beginning
n
semantics
29. A constant object must be __________; it cannot be modified after it is created.
Default memberwise assignment
operand value
endl (same as 'n')
initialized
30. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
overloading
inline functions
object-oriented analysis and design (OOAD)
const
31. Every C++ program begins execution at the function _________.
type coercion
main
semantics
cin.get(ch)
32. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
fixed
variable
binary operator
classes
33. A human readable file that contains C++ program
source file
return
base class
Arithmetic Operators
34. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
Default memberwise assignment
stack
prompt
35. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
Literals
register
classes
named constant
36. Words that are used for special purposes in a program
inline functions
reserved words
return
prompt
37. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
t
*
showpoint
38. Initializers __________ must be used to initialize constant members of a class.
global
access specifier
type coercion
member
39. Names of things that are used in a program - can apply to variables & constants and functions
void
function prototype
Counter-controlled or definite
identifiers
40. Operator with two operands
binary operator
n
source file
recursive function
41. A variable that holds the address of another variable.
pointer
friend
static_cast<char>(65)
binary operator
42. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
local variable
return
void
const
43. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
const datatype identifier = value
globals
semantics
member
44. 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
scope resolution operator
preprocessor
Preprocessor
45. The ________ enables access to a global variable with the same name as a variable in the current scope.
reserve words
unary scope resolution operator (::)
floating-point
recursive function
46. C++ programs are normally typed into a computer using a(n) ________ program.
linker
editor
inline functions
cin >> variable
47. The sign you use for references
semicolon
static
&
attributes
48. A __________ data member represents class-wide information.
cin.get(ch)
static
virtual functions
global
49. A function is invoked with a ________.
function call
editor
fixed
ofstream
50. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
function overloading
unary scope resolution operator (::)
NULL
friend