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. Class members specified as _________ are accessible anywhere an object of the class is in scope.
base class
public
this
beginning
2. Lists and tables of values can be stored in arrays or __________.
vectors
operand value
Counter-controlled or definite
#include
3. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
constant variable
#include directive
classes
non-static
4. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
selection
new line
static
member
5. The stream insertion operator
derived class
operator
<<
cmath
6. A function that calls itself
selection
scope resolution operator
char
recursive function
7. Repeating a set of instructions a specific number of times is called_________repetition.
register
information hiding
.cpp
Counter-controlled or definite
8. You must have a ___________ for every variable you intend to use in a program
?
left
definition
heap
9. The number used to refer to a particular element of an array is called its ________.
semicolon
subscript (or index)
loader
polymorphism
10. 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.
arithmetic expression
this
information hiding
int values
11. A type of pointer that can point at objects of any data type.
polymorphism
this
opened
void pointer
12. A variable that is known only within the function in which it is defined is called a ________.
Preprocessor
member
local variable
type coercion
13. Names of things that are used in a program - can apply to variables & constants and functions
classes
binary operator
function parameters
identifiers
14. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
inline functions
case sensitive
break
named constant
15. The ________ enables access to a global variable with the same name as a variable in the current scope.
reserved words
{ }
unary scope resolution operator (::)
polymorphism
16. A function ________ enables a single function to be defined to perform a task on many different data types.
global
integer operands
template
assignment statement
17. The ________ program transfers the executable image of a C++ program from disk to memory.
&
classes
integer operands
loader
18. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
strlen()
binary operator
global
19. Executable version of program
Counter-controlled or definite
object file
allocating memory
?
20. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
main
heap
n
21. Words that are used for special purposes in a program
reserved words
static_cast<char>(65)
recursive function
//
22. Use 2 characters to represent one
escape sequences
static
object file
named constant
23. An expression in which all operands have the same data type - result will have the same data type as operands
editor
fstream
like-type expression
0
24. Returns the length of a string excluding the null terminator.
reserved words
strlen()
Literals
continue
25. Identifier or expression that is part of the calculation to be performed
operand value
NULL
#include
prompt
26. Whole numbers - no decimals and no commas included
linker
access specifier
int values
data type
27. A C++ statement that makes a decision is ______.
if
pointer
unary scope resolution operator (::)
#include
28. The address-of operator. it is used to assign pointers and to print the address of variables.
comments
main
syntax
&
29. An operator that can only be used with int values. result will always be an int.
recursive function
% modulus
stack
pointer
30. 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.
{ }
dot (.)
two-dimensional
identifiers
31. All ______ must be declared before they are used.
variables
non-static
const
base class
32. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
beginning
sorting
#include
Literals
33. A set of values together with a set of operations
int values
cmath
classes
data type
34. Associate an identifier with a memory location
allocating memory
token
&
editor
35. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
operand value
delete
continue
getline
36. A filestream variable that represents the default input source
address
assignment
Sentinel
cin
37. 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.
static
inline functions
&
binary operator
38. A filestream variable that represents the default output device
cout
information hiding
Default memberwise assignment
assignment statement
39. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
#include <headerfilename>
special symbols
prompt
40. newline
n
Literals
getline
const datatype identifier = value
41. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
auto
access specifier
strcmp()
42. Sets floating-point values to a fixed decimal format
object file
variable
fixed
token
43. Used for function calls and local variables
source file
stack
continue
subscript (or index)
44. Function ________ is used to produce random numbers.
rand
strcpy()
<<
showpoint
45. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
escape sequences
operator overloading
variables
46. Characters used to separate symbols or reserved words or identifiers and statements
object-oriented analysis and design (OOAD)
whitespace
Arithmetic Operators
static
47. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
dot (.)
associations
virtual functions
48. The modulus operator (%) can be used only with __________.
address
variables
integer operands
information hiding
49. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
>>
cin >> variable
escape sequences
allocating memory
50. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Stack overflow
function prototype
cin
cmath