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. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
stack
overloading
default constructor
private
2. A variable that holds the address of another variable.
global
pointer
cin
.cpp
3. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
recursive function
type casting (conversion)
continue
friend
4. C++ programs are normally typed into a computer using a(n) ________ program.
editor
operator
unary operator
before
5. Executable version of program
public
inheritance
cin
object file
6. A pointer is a variable that contains as its value the____________ of another variable.
void pointer
inheritance
strcpy()
address
7. 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.
return
void
Counter-controlled or definite
integer operands
8. 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.
<<
inheritance
editor
selection
9. Type casting syntax
#include <headerfilename>
base class
static_cast<char>(65)
whitespace
10. The process of determining if an array contains a particular key value is called _________ the array.
0
searching
identifiers
semantics
11. The ________ statement in a called function passes the value of an expression back to the calling function.
virtual functions
arithmetic expression
return
new line
12. Used to qualify hidden names so that they can be used.
scope resolution operator
this
floating-point
integer operands
13. directive A statement that starts with a # is called a ____________.
mixed expression
unary operator
operator overloading
Preprocessor
14. The storage-class specifiers are mutable - auto - ________ - extern and static.
classes
register
variables
.cpp
15. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
register
initialized
function scope
cmath
16. A variable that is known only within the function in which it is defined is called a ________.
local variable
base
public
recursive function
17. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
floating-point
scope resolution operator
inline functions
Literals
18. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
prompt
char
opened
named constant
19. The stream insertion operator
<<
vectors
floating-point
left
20. A __________ should be used to declare the size of an array because it makes the program more scalable.
address
inheritance
constant variable
return
21. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
int values
endl (same as 'n')
#include
beginning
22. A C++ statement that makes a decision is ______.
Closing brace
NULL
recursive function
if
23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
heap
setw
//
if...else
24. The _____ causes the contents of another file to be inserted into a program.
cmath
#include directive
break
mixed expression
25. Default name of executable file
#include
classes
/n
a.out
26. The elements of an array are related by the fact that they have the same name and ___________.
const datatype identifier = value
type
linker
floating-point
27. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
object file
auto
stack
Closing brace
28. Associate an identifier with a memory location
ofstream
endl (same as 'n')
allocating memory
mixed expression
29. The sign you use for references
static_cast<char>(65)
&
special symbols
function scope
30. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
binary operator
this
before
31. All ______ must be declared before they are used.
static
variables
special symbols
pointer
32. Grammar rules of the language; compiler will try to identify and locate syntax errors
mixed expression
binary operator
syntax
function scope
33. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
*
getline
//
named constant
34. Naming convention for C++ programs
.cpp
recursive
>>
associations
35. Creates a copy of a string.
::
&
#include <headerfilename>
strcpy()
36. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
static
assignment
#include <headerfilename>
virtual functions
37. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
this
definition
getline
38. The address-of operator. it is used to assign pointers and to print the address of variables.
strcmp()
left
&
function call
39. Compares two strings and returns 0 if they are equal.
Arithmetic Operators
strcmp()
Stack overflow
assignment statement
40. Most calculations are normally performed by ______ statements.
integer operands
void pointer
assignment
object-oriented analysis and design (OOAD)
41. A filestream variable that represents the default output device
register
classes
cout
two-dimensional
42. Operator with two operands
new line
binary operator
ofstream
reserve words
43. An expression that has operands with different data types
opened
token
mixed expression
selection
44. * / % + -
type
polymorphism
prompt
Arithmetic Operators
45. Header file that contains commonly performed mathematical functions
cmath
arithmetic expression
n
?
46. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
char
default constructor
return
void
47. All C++ Variables are_________.
stack
endl (same as 'n')
dot (.)
case sensitive
48. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
associations
address
private
void
49. A human readable file that contains C++ program
access specifier
source file
case sensitive
subscript (or index)
50. Nonexecutable statements that are included in a program to provide information about what the program does etc.
constant variable
comments
editor
non-static