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.
return
Stack overflow
linker
% modulus
2. Characters used to separate symbols or reserved words or identifiers and statements
auto
Arithmetic Operators
whitespace
cin >> variable
3. Executable version of program
base
object file
preprocessor
two-dimensional
4. The storage-class specifiers are mutable - auto - ________ - extern and static.
whitespace
recursive
cin >> variable
register
5. Used for dynamically allocated variables
heap
::
register
data type
6. Function ________ is used to set the random number seed to randomize a program.
main
fixed
preprocessor
srand
7. Keyword public is a(n) _________
binary operator
operator
access specifier
pointer
8. An operator that can only be used with int values. result will always be an int.
% modulus
information hiding
register
<<
9. Operator with only one operand
local variable
prompt
unary operator
object-oriented analysis and design (OOAD)
10. A variable declared outside any block or function is a ________ variable.
% modulus
Sentinel
associations
global
11. Function ________ is used to produce random numbers.
inline functions
a.out
0
rand
12. This is used to mark the end of a complete C++ programming statement.
cin
Semicolon
associations
definition
13. The ________ of an identifier is the portion of the program in which the identifier can be used.
showpoint
searching
scope
srand
14. Identifier or expression that is part of the calculation to be performed
delete
local variable
operand value
derived class
15. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
sorting
inline functions
vectors
cout
16. Grammar rules of the language; compiler will try to identify and locate syntax errors
a.out
syntax
assignment
#include
17. The modulus operator (%) can be used only with __________.
type casting (conversion)
#include <headerfilename>
integer operands
globals
18. The address-of operator. it is used to assign pointers and to print the address of variables.
subscript (or index)
#include directive
&
reserve words
19. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
endl (same as 'n')
virtual functions
two-dimensional
Unified Modeling Language(UML)
20. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
a.out
information hiding
identifiers
function prototype
21. A sequence of operands and operators that describe a calculation to be performed
switch
floating-point
arithmetic expression
global
22. The ________ enables access to a global variable with the same name as a variable in the current scope.
Preprocessor
classes
char
unary scope resolution operator (::)
23. A program that finds and attaches to your program the indicated libraries for compilation
integer operands
overloading
virtual functions
preprocessor
24. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
Semicolon
switch
t
const
25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
if...else
associations
prompt
operator overloading
26. 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 (.)
delete
const
recursive function
27. The sign you use for pointers
strlen()
*
case sensitive
cmath
28. A constant object must be __________; it cannot be modified after it is created.
cin.get(ch)
named constant
initialized
function overloading
29. __________ can be used to assign an object of a class to another object of the same class.
<<
heap
auto
Default memberwise assignment
30. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
two-dimensional
globals
local variable
31. The __________ operator reclaims memory previously allocated by new.
function overloading
delete
strlen()
searching
32. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
function parameters
continue
?
33. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
strlen()
&
::
34. A function that calls itself
left
recursive function
auto
operand value
35. A function ________ enables a single function to be defined to perform a task on many different data types.
register
*
template
selection
36. The idea that you can call the same function and the output will depend on the type of object you're using.
cin
polymorphism
register
?
37. Member objects are constructed __________ their enclosing class object.
.cpp
token
editor
before
38. All ______ must be declared before they are used.
recursive function
delete
variables
initialized
39. 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
ofstream
globals
assignment
40. Used to qualify hidden names so that they can be used.
selection
type coercion
recursive
scope resolution operator
41. The number used to refer to a particular element of an array is called its ________.
pointer
Stack overflow
type coercion
subscript (or index)
42. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
static
allocating memory
local variable
break
43. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
scope
recursive
semicolon
strcmp()
44. When a value of one data type is implicitly (automatically) changed to another data type
static_cast<char>(65)
type coercion
char
fstream
45. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
continue
sorting
default constructor
46. The size & shape & color and weight of an object are considered
attributes
object-oriented analysis and design (OOAD)
pointer
NULL
47. Use 2 characters to represent one
escape sequences
?
named constant
strcpy()
48. These are data items whose values do not change while the program is running
NULL
Literals
editor
#include <headerfilename>
49. Operator with two operands
binary operator
getline
base
if...else
50. A variable that is known only within the function in which it is defined is called a ________.
#include <headerfilename>
new line
local variable
access specifier