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. 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.
heap
void
setw
selection
2. data types that refer to numbers with decimals
floating-point
const
cin >> variable
pointer
3. Sets floating-point values to a fixed decimal format
Stack overflow
rand
fixed
reserve words
4. A function is invoked with a ________.
function overloading
beginning
0
function call
5. The process of analyzing and designing a system from an object-oriented point of view is called ________.
information hiding
variables
case sensitive
object-oriented analysis and design (OOAD)
6. 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
overloading
preprocessor
const
7. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
escape sequences
preprocessor
this
8. Type casting syntax
constant variable
#include directive
static_cast<char>(65)
reserve words
9. The sign you use for references
strcmp()
&
operator
public
10. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
two-dimensional
information hiding
cin.get(ch)
static_cast<char>(65)
11. Whole numbers - no decimals and no commas included
two-dimensional
type coercion
int values
token
12. A function that can be used to read character data including whitespace
member
if...else
pointer
cin.get(ch)
13. tab
template
t
#include <headerfilename>
local variable
14. = & | are examples of ____________.
int values
#include <headerfilename>
opened
special symbols
15. Every C++ statement ends with a(n) _________.
two-dimensional
semicolon
information hiding
like-type expression
16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
editor
endl (same as 'n')
auto
void
17. Used to qualify hidden names so that they can be used.
Counter-controlled or definite
heap
scope resolution operator
NULL
18. Header file that contains commonly performed mathematical functions
cmath
cin
named constant
friend
19. When a value of one data type is implicitly (automatically) changed to another data type
cmath
object file
type coercion
&
20. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
?
void
&
21. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
object file
ofstream
cin >> variable
this
22. Naming convention for C++ programs
.cpp
prompt
like-type expression
object-oriented analysis and design (OOAD)
23. The only integer that can be assigned directly to a pointer is_____________.
function call
classes
0
this
24. Class members specified as _________ are accessible anywhere an object of the class is in scope.
cout
operand value
editor
public
25. Identifier or expression that is part of the calculation to be performed
operand value
stack
recursive function
unary operator
26. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
Literals
pointer
cin
27. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
break
operand value
Unified Modeling Language(UML)
derived class
28. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
{ }
private
selection
Default memberwise assignment
29. newline
attributes
selection
n
variable
30. Executable version of program
object file
operator
selection
strcmp()
31. Grammar rules of the language; compiler will try to identify and locate syntax errors
overloading
register
reserve words
syntax
32. 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.
t
classes
#include directive
/n
33. Most calculations are normally performed by ______ statements.
assignment
subscript (or index)
cin >> variable
#include
34. In inheritance the ____________ is the class the receives the inherited members.
allocating memory
associations
derived class
type
35. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
variable
subscript (or index)
void pointer
36. The __________ operator reclaims memory previously allocated by new.
::
semantics
delete
new line
37. A human readable file that contains C++ program
constant variable
source file
global
virtual functions
38. The process of determining if an array contains a particular key value is called _________ the array.
<<
access specifier
function parameters
searching
39. A __________ data member represents class-wide information.
access specifier
static
const
preprocessor
40. Names of things that are used in a program - can apply to variables & constants and functions
Literals
address
identifiers
token
41. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
strcpy()
register
% modulus
Stack overflow
42. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
floating-point
cin.get(ch)
fixed
43. A sequence of operands and operators that describe a calculation to be performed
local variable
vectors
arithmetic expression
return
44. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
new line
Default memberwise assignment
private
assignment statement
45. A pointer is a variable that contains as its value the____________ of another variable.
public
address
strlen()
object-oriented analysis and design (OOAD)
46. An expression that has operands with different data types
if
function call
type coercion
mixed expression
47. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
void pointer
selection
named constant
&
48. The idea that you can call the same function and the output will depend on the type of object you're using.
fstream
int values
polymorphism
type casting (conversion)
49. 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.
base
//
selection
Sentinel
50. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
switch
special symbols
binary operator