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. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
/n
non-static
syntax
2. Whole numbers - no decimals and no commas included
two-dimensional
Literals
int values
default constructor
3. The elements of an array are related by the fact that they have the same name and ___________.
Arithmetic Operators
vectors
ofstream
type
4. Used for function calls and local variables
getline
stack
pointer
preprocessor
5. 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.
inheritance
Stack overflow
access specifier
void pointer
6. Member objects are constructed __________ their enclosing class object.
static
base
before
operator overloading
7. The sign you use for pointers
cin >> variable
heap
srand
*
8. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
9. C++ programs are normally typed into a computer using a(n) ________ program.
*
editor
before
beginning
10. Forces the computer to display decimal point and trailing zeroes
case sensitive
cin.get(ch)
setw
showpoint
11. You must have a ___________ for every variable you intend to use in a program
definition
//
static_cast<char>(65)
cout
12. A __________ should be used to declare the size of an array because it makes the program more scalable.
non-static
constant variable
static
syntax
13. A set of values together with a set of operations
function prototype
data type
Preprocessor
cin
14. An operator that can only be used with int values. result will always be an int.
t
classes
static_cast<char>(65)
% modulus
15. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
binary operator
left
?
16. This manipulator is used to establish a field width for the value immediately following it.
global
type
setw
stack
17. A ________ program executes before the compiler's translation phase begins.
preprocessor
operand value
const
non-static
18. An expression in which all operands have the same data type - result will have the same data type as operands
reserved words
cin.get(ch)
like-type expression
member
19. Classes can have relationships with other classes. These relationships are called ________.
associations
function scope
type coercion
globals
20. 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.
Sentinel
like-type expression
void pointer
local variable
21. This is used to mark the end of a complete C++ programming statement.
Semicolon
Unified Modeling Language(UML)
beginning
Counter-controlled or definite
22. To write data to a file you define an object of which one of the following
&
recursive
cout
ofstream
23. A constant object must be __________; it cannot be modified after it is created.
integer operands
dot (.)
initialized
#include directive
24. An expression that has operands with different data types
linker
mixed expression
variables
cout
25. Identifier or expression that is part of the calculation to be performed
beginning
operand value
semicolon
function prototype
26. 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.
rand
function overloading
static
reserved words
27. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
associations
const
derived class
preprocessor
28. Class members specified as _________ are accessible anywhere an object of the class is in scope.
sorting
Sentinel
public
strlen()
29. To allow file access in a program you must #include this header file.
two-dimensional
type coercion
fstream
cin.get(ch)
30. These are data items whose values do not change while the program is running
comments
inheritance
editor
Literals
31. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
pointer
before
main
32. A variable that is known only within the function in which it is defined is called a ________.
assignment
ofstream
comments
local variable
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
a.out
identifiers
new line
recursive function
34. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
setw
derived class
showpoint
35. The ________ statement in a called function passes the value of an expression back to the calling function.
NULL
Literals
#include directive
return
36. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
address
&
switch
case sensitive
37. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
unary scope resolution operator (::)
::
break
new line
38. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
recursive function
template
strlen()
inline functions
39. A function is invoked with a ________.
function call
void
definition
information hiding
40. The number used to refer to a particular element of an array is called its ________.
Preprocessor
cin >> variable
subscript (or index)
/n
41. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
member
a.out
operator overloading
inline functions
42. Naming convention for C++ programs
associations
type coercion
static_cast<char>(65)
.cpp
43. The __________ operator reclaims memory previously allocated by new.
const
private
Literals
delete
44. A filestream variable that represents the default output device
cout
0
left
getline
45. The symbol for the binary scope resolution operator
operand value
int values
::
editor
46. The process of analyzing and designing a system from an object-oriented point of view is called ________.
inheritance
object-oriented analysis and design (OOAD)
editor
overloading
47. Allows the programmer to store a value in a variable
non-static
like-type expression
assignment statement
derived class
48. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
object file
template
global
49. If a member initializer is not provided for a member object of a class the object's __________ is called.
special symbols
base class
default constructor
unary operator
50. Used for dynamically allocated variables
heap
&
*
function scope