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. Symbol that denotes an action to be performed
Preprocessor
operator
identifiers
new line
2. Operator with only one operand
syntax
/n
unary operator
new line
3. The storage-class specifiers are mutable - auto - ________ - extern and static.
fstream
void
Semicolon
register
4. Program components in C++ are called functions and ________.
classes
whitespace
overloading
Stack overflow
5. Creates a copy of a string.
cin
strcpy()
classes
identifiers
6. Operator with two operands
function call
arithmetic expression
function parameters
binary operator
7. A variable that is known only within the function in which it is defined is called a ________.
srand
binary operator
>>
local variable
8. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
information hiding
Unified Modeling Language(UML)
base class
9. 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.
initialized
?
like-type expression
template
10. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
variables
attributes
function prototype
char
11. Identifier or expression that is part of the calculation to be performed
operand value
globals
reserve words
pointer
12. To allow file access in a program you must #include this header file.
fstream
preprocessor
0
subscript (or index)
13. The number used to refer to a particular element of an array is called its ________.
variables
whitespace
subscript (or index)
0
14. Default name of executable file
object-oriented analysis and design (OOAD)
dot (.)
semicolon
a.out
15. Syntax for named constant declaration
void
semicolon
const datatype identifier = value
Preprocessor
16. Characters used to separate symbols or reserved words or identifiers and statements
special symbols
object file
continue
whitespace
17. 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
base
ofstream
18. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
reserved words
loader
main
19. A memory location with a name and data type - its content may be changed during program execution
switch
Unified Modeling Language(UML)
variable
cin >> variable
20. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
fstream
static
n
new line
21. All ______ must be declared before they are used.
*
before
//
variables
22. Lists and tables of values can be stored in arrays or __________.
vectors
static
global
prompt
23. A type of pointer that can point at objects of any data type.
base
Semicolon
void pointer
unary operator
24. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
semicolon
dot (.)
void
information hiding
25. The stream extraction operator
overloading
>>
::
opened
26. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
showpoint
inheritance
static
object-oriented analysis and design (OOAD)
27. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
srand
switch
cin
scope
28. Naming convention for C++ programs
syntax
.cpp
<<
base
29. The three values that can be used to initialize a pointer are 0 - __________ and an address.
globals
NULL
assignment
*
30. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
&
static
operator overloading
function parameters
31. A human readable file that contains C++ program
Counter-controlled or definite
register
comments
source file
32. Keyword public is a(n) _________
operator
access specifier
recursive
named constant
33. Preprocessor directive syntax
char
escape sequences
pointer
#include <headerfilename>
34. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
&
return
char
heap
35. The address-of operator. it is used to assign pointers and to print the address of variables.
&
function parameters
inheritance
address
36. A variable declared outside any block or function is a ________ variable.
continue
cmath
variable
global
37. The process of placing the elements of an array in order is called ________ the array.
operator
cin.get(ch)
sorting
ofstream
38. A member function should be declared static if it does not access __________ class members.
0
non-static
token
% modulus
39. An array that uses two subscripts is referred to as a(n) _________ array.
sorting
two-dimensional
NULL
Semicolon
40. If a member initializer is not provided for a member object of a class the object's __________ is called.
pointer
return
definition
default constructor
41. Executable version of program
object file
Closing brace
function parameters
private
42. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
Counter-controlled or definite
getline
unary operator
selection
43. Whole numbers - no decimals and no commas included
inheritance
return
int values
void pointer
44. Every C++ statement ends with a(n) _________.
NULL
void pointer
constant variable
semicolon
45. Function ________ is used to produce random numbers.
rand
srand
function scope
type
46. The idea that you can call the same function and the output will depend on the type of object you're using.
strcmp()
polymorphism
cin >> variable
//
47. An operator that can only be used with int values. result will always be an int.
floating-point
semicolon
% modulus
opened
48. Message displayed to the screen asking user for input; generated with an output statement
prompt
void
unary operator
information hiding
49. 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.
void
.cpp
t
overloading
50. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
switch
n
private
const