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. A variable declared outside any block or function is a ________ variable.
recursive function
global
two-dimensional
comments
2. All C++ Variables are_________.
attributes
semantics
case sensitive
polymorphism
3. The ________ program combines the output of the compiler with various library functions to produce an executable image.
Stack overflow
void
linker
virtual functions
4. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
prompt
fixed
heap
5. tab
static_cast<char>(65)
cin.get(ch)
t
Semicolon
6. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
subscript (or index)
linker
fstream
7. A constant object must be __________; it cannot be modified after it is created.
initialized
main
data type
showpoint
8. Operator with two operands
binary operator
classes
delete
fstream
9. A variable that holds the address of another variable.
overloading
opened
pointer
void pointer
10. Default name of executable file
a.out
like-type expression
.cpp
classes
11. data types that refer to numbers with decimals
floating-point
int values
static_cast<char>(65)
::
12. A filestream variable that represents the default output device
escape sequences
getline
cin
cout
13. The size & shape & color and weight of an object are considered
subscript (or index)
rand
attributes
associations
14. Associate an identifier with a memory location
delete
vectors
allocating memory
overloading
15. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
operator overloading
type coercion
classes
16. These are data items whose values do not change while the program is running
integer operands
Literals
mixed expression
srand
17. Most calculations are normally performed by ______ statements.
strcmp()
continue
assignment
heap
18. In inheritance the ____________ is the class the receives the inherited members.
derived class
cin >> variable
operator
globals
19. You can declare default values for a function in the ____________________.
#include <headerfilename>
definition
% modulus
function parameters
20. 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.
attributes
static
prompt
template
21. A variable that is known only within the function in which it is defined is called a ________.
two-dimensional
derived class
local variable
like-type expression
22. An expression that has operands with different data types
information hiding
/n
setw
mixed expression
23. C++ programs are normally typed into a computer using a(n) ________ program.
editor
fstream
a.out
stack
24. An operator that can only be used with int values. result will always be an int.
% modulus
a.out
scope
unary operator
25. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
assignment
::
void pointer
26. Creates a copy of a string.
loader
classes
&
strcpy()
27. The address-of operator. it is used to assign pointers and to print the address of variables.
register
default constructor
arithmetic expression
&
28. Message displayed to the screen asking user for input; generated with an output statement
globals
prompt
source file
void pointer
29. Member objects are constructed __________ their enclosing class object.
base
before
subscript (or index)
void
30. The _____ causes the contents of another file to be inserted into a program.
cin.get(ch)
base
#include directive
function scope
31. 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 (.)
constant variable
continue
cin
32. The sign you use for pointers
*
case sensitive
>>
member
33. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
function call
default constructor
NULL
34. A function that can be used to read character data including whitespace
inheritance
strlen()
cin.get(ch)
Preprocessor
35. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
before
overloading
escape sequences
preprocessor
36. A program that finds and attaches to your program the indicated libraries for compilation
main
#include
preprocessor
new line
37. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
function prototype
token
polymorphism
loader
38. 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
39. The process of placing the elements of an array in order is called ________ the array.
Sentinel
sorting
type coercion
globals
40. Program components in C++ are called functions and ________.
classes
>>
&
Stack overflow
41. Two slash marks ( // ) indicate __________ of a comment
left
Stack overflow
beginning
break
42. Header file that contains commonly performed mathematical functions
scope
comments
friend
cmath
43. The storage-class specifiers are mutable - auto - ________ - extern and static.
n
prompt
main
register
44. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
token
editor
Stack overflow
45. A ________ program executes before the compiler's translation phase begins.
preprocessor
getline
rand
floating-point
46. Used for dynamically allocated variables
reserve words
heap
function scope
//
47. A pointer is a variable that contains as its value the____________ of another variable.
data type
if
left
address
48. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
Arithmetic Operators
//
assignment
unary scope resolution operator (::)
49. __________ can be used to assign an object of a class to another object of the same class.
globals
public
type coercion
Default memberwise assignment
50. * / % + -
friend
break
>>
Arithmetic Operators