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 set of values together with a set of operations
sorting
data type
polymorphism
Default memberwise assignment
2. A filestream variable that represents the default output device
Stack overflow
global
object file
cout
3. 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
type casting (conversion)
new line
selection
4. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
whitespace
<<
escape sequences
token
5. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
::
setw
Default memberwise assignment
6. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
sorting
Preprocessor
Arithmetic Operators
overloading
7. All C++ Variables are_________.
case sensitive
endl (same as 'n')
rand
#include directive
8. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
Sentinel
delete
if...else
case sensitive
9. A type of pointer that can point at objects of any data type.
void pointer
const datatype identifier = value
floating-point
token
10. The ________ statement in a called function passes the value of an expression back to the calling function.
identifiers
return
subscript (or index)
continue
11. 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.
object file
recursive function
static
0
12. Whole numbers - no decimals and no commas included
int values
selection
binary operator
beginning
13. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
const datatype identifier = value
inheritance
linker
int values
14. The only integer that can be assigned directly to a pointer is_____________.
.cpp
0
stack
virtual functions
15. 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
16. The address-of operator. it is used to assign pointers and to print the address of variables.
if...else
static
associations
&
17. Naming convention for C++ programs
.cpp
stack
function parameters
::
18. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
static
void
void
19. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
?
non-static
void
function scope
20. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
classes
switch
access specifier
selection
21. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
Default memberwise assignment
derived class
if
break
22. An array that uses two subscripts is referred to as a(n) _________ array.
/n
two-dimensional
cmath
continue
23. = & | are examples of ____________.
special symbols
<<
delete
const
24. data types that refer to numbers with decimals
floating-point
dot (.)
linker
before
25. A variable that is known only within the function in which it is defined is called a ________.
local variable
const
function prototype
derived class
26. Used for dynamically allocated variables
cin.get(ch)
cmath
heap
{ }
27. Header file that contains commonly performed mathematical functions
binary operator
cmath
strlen()
subscript (or index)
28. A constant object must be __________; it cannot be modified after it is created.
source file
preprocessor
>>
initialized
29. C++ programs are normally typed into a computer using a(n) ________ program.
editor
comments
n
beginning
30. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
function parameters
void
int values
31. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
{ }
#include
recursive function
constant variable
32. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
endl (same as 'n')
Counter-controlled or definite
unary scope resolution operator (::)
33. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
*
source file
inline functions
#include
34. The sign you use for pointers
function overloading
<<
overloading
*
35. The stream insertion operator
<<
opened
base class
named constant
36. The size & shape & color and weight of an object are considered
void
scope
recursive function
attributes
37. You must have a ___________ for every variable you intend to use in a program
definition
special symbols
vectors
associations
38. These are data items whose values do not change while the program is running
Literals
local variable
static_cast<char>(65)
preprocessor
39. Operator with only one operand
template
unary operator
function scope
opened
40. Type casting syntax
static_cast<char>(65)
if...else
setw
mixed expression
41. * / % + -
subscript (or index)
Arithmetic Operators
setw
variable
42. The ________ program combines the output of the compiler with various library functions to produce an executable image.
local variable
public
pointer
linker
43. An operator that can only be used with int values. result will always be an int.
new line
information hiding
Semicolon
% modulus
44. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
cin.get(ch)
derived class
preprocessor
45. The ________ qualifier is used to declare read-only variables.
if
const
cmath
inheritance
46. 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 (.)
arithmetic expression
reserve words
strcpy()
47. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
arithmetic expression
#include directive
continue
48. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
opened
Stack overflow
private
address
49. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
pointer
heap
cout
50. Classes can have relationships with other classes. These relationships are called ________.
associations
cmath
derived class
operator