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.
t
new line
getline
this
2. 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.
object-oriented analysis and design (OOAD)
#include directive
virtual functions
integer operands
3. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
delete
semantics
prompt
const
4. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
editor
information hiding
Counter-controlled or definite
5. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
new line
const
//
loader
6. Used for function calls and local variables
static
cin >> variable
stack
virtual functions
7. The ________ statement in a called function passes the value of an expression back to the calling function.
binary operator
return
unary scope resolution operator (::)
virtual functions
8. Names of things that are used in a program - can apply to variables & constants and functions
<<
unary scope resolution operator (::)
variable
identifiers
9. tab
t
cin >> variable
arithmetic expression
rand
10. A function that calls itself
static
case sensitive
local variable
recursive function
11. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
preprocessor
Literals
Stack overflow
&
12. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
local variable
pointer
information hiding
register
13. The ________ of an identifier is the portion of the program in which the identifier can be used.
information hiding
floating-point
scope
unary operator
14. Syntax for named constant declaration
beginning
char
#include <headerfilename>
const datatype identifier = value
15. A variable that holds the address of another variable.
semicolon
% modulus
pointer
static_cast<char>(65)
16. Member objects are constructed __________ their enclosing class object.
before
inheritance
constant variable
char
17. To allow file access in a program you must #include this header file.
template
fstream
allocating memory
fixed
18. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
cin.get(ch)
/n
object-oriented analysis and design (OOAD)
allocating memory
19. 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
srand
const
#include directive
20. The number used to refer to a particular element of an array is called its ________.
strlen()
Preprocessor
void
subscript (or index)
21. All C++ Variables are_________.
object file
default constructor
case sensitive
prompt
22. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
address
associations
strlen()
23. Sets floating-point values to a fixed decimal format
reserved words
object file
base class
fixed
24. Message displayed to the screen asking user for input; generated with an output statement
default constructor
auto
//
prompt
25. Used to qualify hidden names so that they can be used.
scope resolution operator
break
variables
?
26. 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
classes
access specifier
rand
27. To write data to a file you define an object of which one of the following
mixed expression
continue
ofstream
n
28. Classes can have relationships with other classes. These relationships are called ________.
associations
pointer
reserve words
global
29. The three values that can be used to initialize a pointer are 0 - __________ and an address.
polymorphism
void
NULL
variables
30. A function that can be used to read character data including whitespace
cin.get(ch)
private
source file
{ }
31. Characters used to separate symbols or reserved words or identifiers and statements
t
whitespace
Closing brace
function overloading
32. An array that uses two subscripts is referred to as a(n) _________ array.
/n
int values
//
two-dimensional
33. Forces the computer to display decimal point and trailing zeroes
assignment statement
overloading
escape sequences
showpoint
34. Initializers __________ must be used to initialize constant members of a class.
Default memberwise assignment
cin
member
before
35. Program components in C++ are called functions and ________.
% modulus
classes
subscript (or index)
binary operator
36. __________ can be used to assign an object of a class to another object of the same class.
a.out
Default memberwise assignment
object-oriented analysis and design (OOAD)
member
37. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
beginning
Closing brace
token
cmath
38. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
::
subscript (or index)
linker
39. Repeating a set of instructions a specific number of times is called_________repetition.
recursive
Counter-controlled or definite
vectors
constant variable
40. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
derived class
Unified Modeling Language(UML)
#include
auto
41. The modulus operator (%) can be used only with __________.
type coercion
strlen()
integer operands
?
42. Naming convention for C++ programs
.cpp
strcmp()
break
cin
43. Symbol that denotes an action to be performed
cin.get(ch)
operator
>>
variable
44. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
operator
Unified Modeling Language(UML)
fstream
associations
45. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
subscript (or index)
register
//
strcpy()
46. A function is invoked with a ________.
cin.get(ch)
strlen()
function call
if...else
47. A function ________ enables a single function to be defined to perform a task on many different data types.
a.out
register
default constructor
template
48. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
scope
setw
private
fstream
49. For every opening brace in a C++ program there must be a ______________.
Closing brace
ofstream
#include
reserve words
50. An expression that has operands with different data types
fixed
mixed expression
subscript (or index)
named constant