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 nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
//
type
0
2. 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.
void
reserve words
dot (.)
searching
3. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
cin
#include
escape sequences
inline functions
4. All C++ Variables are_________.
base class
case sensitive
before
auto
5. The process of determining if an array contains a particular key value is called _________ the array.
strcmp()
Literals
searching
a.out
6. Preprocessor directive syntax
searching
polymorphism
global
#include <headerfilename>
7. When a value of one data type is implicitly (automatically) changed to another data type
const datatype identifier = value
Preprocessor
type coercion
*
8. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
private
Default memberwise assignment
subscript (or index)
Unified Modeling Language(UML)
9. The idea that you can call the same function and the output will depend on the type of object you're using.
0
reserve words
polymorphism
syntax
10. Every C++ program begins execution at the function _________.
srand
main
beginning
int values
11. Default name of executable file
inheritance
inline functions
a.out
dot (.)
12. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
type casting (conversion)
syntax
like-type expression
globals
13. 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.
cout
whitespace
loader
Sentinel
14. Syntax for named constant declaration
const
const datatype identifier = value
this
semantics
15. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
vectors
static_cast<char>(65)
showpoint
new line
16. directive A statement that starts with a # is called a ____________.
local variable
Preprocessor
semantics
cmath
17. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
char
token
information hiding
Semicolon
18. An operator that can only be used with int values. result will always be an int.
const
attributes
assignment
% modulus
19. A variable declared outside any block or function is a ________ variable.
inline functions
/n
global
scope
20. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
cin >> variable
globals
member
this
21. 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
22. 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.
static
scope resolution operator
Semicolon
loader
23. 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
searching
base
recursive
type
24. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
object-oriented analysis and design (OOAD)
beginning
identifiers
25. A memory location with a name and data type - its content may be changed during program execution
variable
default constructor
{ }
escape sequences
26. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
reserve words
variables
operator overloading
type casting (conversion)
27. Sets floating-point values to a fixed decimal format
fixed
global
register
derived class
28. The number used to refer to a particular element of an array is called its ________.
member
Literals
selection
subscript (or index)
29. A filestream variable that represents the default input source
Semicolon
editor
mixed expression
cin
30. A sequence of operands and operators that describe a calculation to be performed
two-dimensional
identifiers
template
arithmetic expression
31. Symbol that denotes an action to be performed
assignment
operator
Literals
heap
32. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
new line
unary operator
classes
member
33. A human readable file that contains C++ program
case sensitive
source file
static
selection
34. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
stack
like-type expression
information hiding
getline
35. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
classes
if...else
inline functions
const
36. newline
break
function parameters
switch
n
37. In inheritance the ____________ is the class the receives the inherited members.
constant variable
derived class
subscript (or index)
operand value
38. For every opening brace in a C++ program there must be a ______________.
token
auto
n
Closing brace
39. A function is invoked with a ________.
function call
token
selection
&
40. A function ________ enables a single function to be defined to perform a task on many different data types.
polymorphism
type coercion
new line
template
41. Compares two strings and returns 0 if they are equal.
Arithmetic Operators
strcmp()
switch
unary scope resolution operator (::)
42. 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
t
associations
NULL
43. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
//
loader
non-static
44. The three values that can be used to initialize a pointer are 0 - __________ and an address.
special symbols
NULL
&
binary operator
45. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
unary operator
if...else
function scope
Default memberwise assignment
46. An expression that has operands with different data types
searching
special symbols
mixed expression
cin
47. The symbol for the binary scope resolution operator
template
::
type casting (conversion)
searching
48. Forces the computer to display decimal point and trailing zeroes
showpoint
switch
*
strcpy()
49. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
linker
&
Default memberwise assignment
named constant
50. tab
variables
n
reserve words
t