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. You can declare default values for a function in the ____________________.
function parameters
#include
base class
t
2. A pointer is a variable that contains as its value the____________ of another variable.
like-type expression
address
heap
auto
3. The ________ qualifier is used to declare read-only variables.
const
pointer
Stack overflow
selection
4. The number used to refer to a particular element of an array is called its ________.
attributes
Arithmetic Operators
subscript (or index)
static
5. The three values that can be used to initialize a pointer are 0 - __________ and an address.
&
NULL
rand
associations
6. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
linker
classes
setw
selection
7. To explicitly indicate that a value is to be converted to another type
register
type casting (conversion)
object-oriented analysis and design (OOAD)
escape sequences
8. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
default constructor
Counter-controlled or definite
address
return
9. The elements of an array are related by the fact that they have the same name and ___________.
default constructor
escape sequences
type
break
10. 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
11. A program that finds and attaches to your program the indicated libraries for compilation
assignment statement
preprocessor
floating-point
.cpp
12. You must have a ___________ for every variable you intend to use in a program
selection
definition
sorting
pointer
13. The sign you use for references
template
&
const datatype identifier = value
.cpp
14. Most calculations are normally performed by ______ statements.
operator
static_cast<char>(65)
break
assignment
15. Initializers __________ must be used to initialize constant members of a class.
Literals
function prototype
member
showpoint
16. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
fstream
information hiding
friend
classes
17. The stream extraction operator
reserve words
>>
NULL
cin.get(ch)
18. A variable that is known only within the function in which it is defined is called a ________.
local variable
cin
unary scope resolution operator (::)
Closing brace
19. The only integer that can be assigned directly to a pointer is_____________.
stack
loader
0
Semicolon
20. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
recursive
object file
Default memberwise assignment
base
21. An expression that has operands with different data types
mixed expression
sorting
variables
strlen()
22. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
base class
pointer
reserved words
23. data types that refer to numbers with decimals
type coercion
beginning
floating-point
n
24. This manipulator is used to establish a field width for the value immediately following it.
//
setw
register
subscript (or index)
25. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
void pointer
searching
default constructor
inline functions
26. Keyword public is a(n) _________
n
/n
access specifier
comments
27. The ________ statement in a called function passes the value of an expression back to the calling function.
return
opened
cout
ofstream
28. Used to qualify hidden names so that they can be used.
scope resolution operator
type
t
fstream
29. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
strcpy()
member
register
int values
30. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
definition
operator overloading
default constructor
31. Operator with only one operand
before
unary operator
function overloading
fixed
32. The process of determining if an array contains a particular key value is called _________ the array.
heap
like-type expression
searching
loader
33. A human readable file that contains C++ program
source file
heap
arithmetic expression
Counter-controlled or definite
34. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
unary scope resolution operator (::)
function scope
static_cast<char>(65)
dot (.)
35. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
Counter-controlled or definite
semantics
template
register
36. Default name of executable file
&
operand value
a.out
selection
37. When a value of one data type is implicitly (automatically) changed to another data type
two-dimensional
pointer
variable
type coercion
38. A type of pointer that can point at objects of any data type.
void pointer
pointer
pointer
binary operator
39. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
void
derived class
strcmp()
40. This is used to mark the end of a complete C++ programming statement.
t
endl (same as 'n')
Semicolon
identifiers
41. Forces the computer to display decimal point and trailing zeroes
preprocessor
.cpp
special symbols
showpoint
42. Allows the programmer to store a value in a variable
object-oriented analysis and design (OOAD)
assignment statement
function overloading
this
43. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
strcmp()
assignment statement
Literals
44. Every C++ program begins execution at the function _________.
main
syntax
static_cast<char>(65)
cin >> variable
45. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
Sentinel
if
ofstream
46. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
if...else
const
editor
getline
47. The size & shape & color and weight of an object are considered
function prototype
attributes
const
stack
48. If a member initializer is not provided for a member object of a class the object's __________ is called.
this
default constructor
floating-point
data type
49. Characters used to separate symbols or reserved words or identifiers and statements
assignment statement
information hiding
whitespace
fixed
50. Preprocessor directive syntax
cin >> variable
linker
#include <headerfilename>
binary operator