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. Associate an identifier with a memory location
<<
allocating memory
getline
semicolon
2. The stream extraction operator
non-static
>>
subscript (or index)
vectors
3. A function that calls itself
recursive function
token
n
initialized
4. A ________ program executes before the compiler's translation phase begins.
constant variable
unary operator
preprocessor
&
5. The size & shape & color and weight of an object are considered
void pointer
variables
attributes
recursive
6. 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
7. The ________ program combines the output of the compiler with various library functions to produce an executable image.
address
assignment
linker
break
8. Identifier or expression that is part of the calculation to be performed
stack
operand value
Closing brace
fstream
9. Used for dynamically allocated variables
heap
linker
reserve words
scope resolution operator
10. = & | are examples of ____________.
auto
cout
special symbols
type
11. The storage-class specifiers are mutable - auto - ________ - extern and static.
linker
inline functions
register
operator overloading
12. A filestream variable that represents the default output device
cout
like-type expression
getline
member
13. A C++ statement that makes a decision is ______.
variable
special symbols
srand
if
14. Characters used to separate symbols or reserved words or identifiers and statements
globals
whitespace
&
getline
15. Function ________ is used to set the random number seed to randomize a program.
srand
void
selection
constant variable
16. The ________ qualifier is used to declare read-only variables.
heap
const
operator
void
17. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
#include <headerfilename>
default constructor
delete
auto
18. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
derived class
assignment statement
virtual functions
19. Every C++ program begins execution at the function _________.
private
void pointer
cin
main
20. __________ can be used to assign an object of a class to another object of the same class.
#include
Unified Modeling Language(UML)
Default memberwise assignment
left
21. The ________ statement in a called function passes the value of an expression back to the calling function.
const datatype identifier = value
private
return
editor
22. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
whitespace
operator overloading
//
showpoint
23. Grammar rules of the language; compiler will try to identify and locate syntax errors
data type
syntax
object file
const
24. Every C++ statement ends with a(n) _________.
semicolon
register
mixed expression
derived class
25. 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.
/n
token
member
Literals
26. * / % + -
cmath
Arithmetic Operators
showpoint
floating-point
27. A __________ data member represents class-wide information.
getline
base
static
public
28. The sign you use for pointers
inline functions
*
before
reserve words
29. These are data items whose values do not change while the program is running
polymorphism
Literals
virtual functions
const
30. The symbol for the binary scope resolution operator
::
dot (.)
<<
friend
31. Used for function calls and local variables
showpoint
Arithmetic Operators
object-oriented analysis and design (OOAD)
stack
32. If a member initializer is not provided for a member object of a class the object's __________ is called.
pointer
globals
default constructor
#include
33. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
recursive function
static
&
34. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
ofstream
prompt
cin.get(ch)
this
35. A filestream variable that represents the default input source
showpoint
cin
auto
strcmp()
36. 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.
Closing brace
switch
named constant
static
37. You must have a ___________ for every variable you intend to use in a program
delete
definition
global
operand value
38. A function ________ enables a single function to be defined to perform a task on many different data types.
dot (.)
function overloading
base class
template
39. A variable declared outside any block or function is a ________ variable.
#include directive
special symbols
global
beginning
40. A function is invoked with a ________.
non-static
function call
special symbols
&
41. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
two-dimensional
new line
mixed expression
template
42. In inheritance the ____________ is the class the receives the inherited members.
derived class
comments
recursive function
inheritance
43. The address-of operator. it is used to assign pointers and to print the address of variables.
heap
&
::
template
44. directive A statement that starts with a # is called a ____________.
Preprocessor
&
Default memberwise assignment
constant variable
45. Nonexecutable statements that are included in a program to provide information about what the program does etc.
identifiers
comments
globals
delete
46. A type of pointer that can point at objects of any data type.
comments
int values
named constant
void pointer
47. This manipulator is used to establish a field width for the value immediately following it.
pointer
return
setw
loader
48. Preprocessor directive syntax
#include <headerfilename>
associations
Stack overflow
object-oriented analysis and design (OOAD)
49. A member function should be declared static if it does not access __________ class members.
special symbols
source file
non-static
template
50. Whole numbers - no decimals and no commas included
new line
int values
cout
arithmetic expression