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. Forces the computer to display decimal point and trailing zeroes
heap
two-dimensional
unary scope resolution operator (::)
showpoint
2. __________ can be used to assign an object of a class to another object of the same class.
local variable
Default memberwise assignment
reserved words
const
3. Every C++ statement ends with a(n) _________.
semicolon
editor
cin.get(ch)
type casting (conversion)
4. Naming convention for C++ programs
linker
preprocessor
.cpp
global
5. For every opening brace in a C++ program there must be a ______________.
identifiers
*
Closing brace
Sentinel
6. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
a.out
auto
global
7. A ________ program executes before the compiler's translation phase begins.
type
void
preprocessor
inheritance
8. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
access specifier
new line
Unified Modeling Language(UML)
int values
9. newline
information hiding
object-oriented analysis and design (OOAD)
member
n
10. Used to qualify hidden names so that they can be used.
dot (.)
continue
scope resolution operator
two-dimensional
11. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
ofstream
function prototype
like-type expression
Semicolon
12. 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 (.)
operator
delete
variable
13. 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.
loader
if...else
static
0
14. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
case sensitive
showpoint
definition
15. 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.
cin >> variable
preprocessor
continue
information hiding
16. A variable that holds the address of another variable.
return
semicolon
case sensitive
pointer
17. directive A statement that starts with a # is called a ____________.
virtual functions
unary scope resolution operator (::)
Preprocessor
//
18. A filestream variable that represents the default input source
cin
definition
escape sequences
#include <headerfilename>
19. 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
default constructor
pointer
inheritance
20. The sign you use for pointers
::
constant variable
*
type casting (conversion)
21. 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.
Semicolon
Sentinel
/n
reserve words
22. The ________ qualifier is used to declare read-only variables.
char
beginning
?
const
23. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
case sensitive
linker
Stack overflow
static
24. The process of analyzing and designing a system from an object-oriented point of view is called ________.
type
strcmp()
scope resolution operator
object-oriented analysis and design (OOAD)
25. 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
assignment
continue
strlen()
26. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
strcpy()
char
type casting (conversion)
delete
27. Symbol that denotes an action to be performed
operator
address
Closing brace
type coercion
28. In inheritance the ____________ is the class that supplies the inherited members.
base class
auto
.cpp
object file
29. The _________ begins the body of every function and the _________ ends the body of every function.
default constructor
type
{ }
Preprocessor
30. C++ programs are normally typed into a computer using a(n) ________ program.
before
fstream
associations
editor
31. The __________ operator reclaims memory previously allocated by new.
delete
base class
preprocessor
inheritance
32. An array that uses two subscripts is referred to as a(n) _________ array.
left
binary operator
.cpp
two-dimensional
33. int namespace include using return examples of ___________
reserve words
vectors
break
Stack overflow
34. A memory location with a name and data type - its content may be changed during program execution
>>
variable
<<
non-static
35. The ________ statement in a called function passes the value of an expression back to the calling function.
break
member
type
return
36. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
Literals
token
//
return
37. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
?
base class
0
token
38. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
stack
main
inheritance
friend
39. The process of determining if an array contains a particular key value is called _________ the array.
function scope
searching
return
pointer
40. These are data items whose values do not change while the program is running
base class
default constructor
showpoint
Literals
41. A filestream variable that represents the default output device
searching
cout
dot (.)
binary operator
42. A human readable file that contains C++ program
Literals
function scope
::
source file
43. Function ________ is used to set the random number seed to randomize a program.
#include <headerfilename>
overloading
srand
allocating memory
44. This manipulator is used to establish a field width for the value immediately following it.
t
opened
setw
classes
45. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
void
assignment
left
static
46. A variable that is known only within the function in which it is defined is called a ________.
type coercion
local variable
/n
strcpy()
47. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
classes
const datatype identifier = value
rand
auto
48. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
operand value
pointer
?
globals
49. Initializers __________ must be used to initialize constant members of a class.
public
address
member
initialized
50. A set of values together with a set of operations
//
data type
&
Arithmetic Operators