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. Most calculations are normally performed by ______ statements.
recursive function
if...else
static
assignment
2. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
assignment statement
recursive
escape sequences
% modulus
3. The stream insertion operator
<<
endl (same as 'n')
private
int values
4. Two slash marks ( // ) indicate __________ of a comment
auto
member
beginning
&
5. The ________ enables access to a global variable with the same name as a variable in the current scope.
srand
public
unary scope resolution operator (::)
private
6. The ________ program combines the output of the compiler with various library functions to produce an executable image.
type
Arithmetic Operators
linker
floating-point
7. Class members specified as _________ are accessible anywhere an object of the class is in scope.
const datatype identifier = value
return
public
recursive
8. A member function should be declared static if it does not access __________ class members.
recursive
&
friend
non-static
9. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
editor
void
Unified Modeling Language(UML)
identifiers
10. A filestream variable that represents the default input source
information hiding
cin
scope resolution operator
if...else
11. 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.
char
dot (.)
Sentinel
sorting
12. The three values that can be used to initialize a pointer are 0 - __________ and an address.
strcmp()
auto
NULL
::
13. A pointer is a variable that contains as its value the____________ of another variable.
address
reserve words
const datatype identifier = value
#include <headerfilename>
14. In inheritance the ____________ is the class the receives the inherited members.
NULL
derived class
recursive function
Stack overflow
15. A set of values together with a set of operations
Literals
data type
const
local variable
16. Lists and tables of values can be stored in arrays or __________.
&
register
default constructor
vectors
17. Allows the programmer to store a value in a variable
token
assignment statement
if
linker
18. Function ________ is used to produce random numbers.
continue
function call
void
rand
19. Compares two strings and returns 0 if they are equal.
beginning
strcmp()
function parameters
operator overloading
20. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
function overloading
classes
reserve words
selection
21. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
access specifier
#include
scope resolution operator
new line
22. Every C++ program begins execution at the function _________.
object-oriented analysis and design (OOAD)
switch
ofstream
main
23. Program components in C++ are called functions and ________.
classes
associations
const datatype identifier = value
function overloading
24. Creates a copy of a string.
default constructor
strcpy()
Semicolon
function prototype
25. Naming convention for C++ programs
.cpp
break
loader
operand value
26. The only integer that can be assigned directly to a pointer is_____________.
0
polymorphism
classes
Semicolon
27. newline
n
cout
strcmp()
private
28. Grammar rules of the language; compiler will try to identify and locate syntax errors
/n
object-oriented analysis and design (OOAD)
syntax
{ }
29. 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.
non-static
void
Semicolon
return
30. directive A statement that starts with a # is called a ____________.
cin.get(ch)
Preprocessor
function prototype
function parameters
31. Used for dynamically allocated variables
heap
classes
public
Closing brace
32. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
static
Closing brace
getline
non-static
33. A function that can be used to read character data including whitespace
searching
cin.get(ch)
arithmetic expression
function scope
34. A function that calls itself
assignment
recursive function
before
type
35. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
% modulus
//
reserve words
inheritance
36. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
virtual functions
return
inline functions
delete
37. Default name of executable file
associations
data type
a.out
variable
38. Returns the length of a string excluding the null terminator.
strlen()
template
information hiding
heap
39. The number used to refer to a particular element of an array is called its ________.
reserve words
subscript (or index)
identifiers
member
40. An expression that has operands with different data types
Unified Modeling Language(UML)
mixed expression
before
dot (.)
41. tab
allocating memory
t
definition
arithmetic expression
42. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
inheritance
vectors
before
43. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
derived class
floating-point
operator
if...else
44. In inheritance the ____________ is the class that supplies the inherited members.
escape sequences
dot (.)
member
base class
45. A __________ should be used to declare the size of an array because it makes the program more scalable.
attributes
#include
constant variable
switch
46. Operator with only one operand
recursive
prompt
unary operator
Sentinel
47. Sets floating-point values to a fixed decimal format
Counter-controlled or definite
break
fixed
type
48. A __________ data member represents class-wide information.
classes
static
::
inheritance
49. This manipulator causes the field to be left-justified with padding spaces printed to the right.
syntax
left
Arithmetic Operators
srand
50. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
char
constant variable
Counter-controlled or definite
const