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_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
scope resolution operator
*
if...else
linker
2. A variable that is known only within the function in which it is defined is called a ________.
linker
local variable
n
base
3. Program components in C++ are called functions and ________.
type coercion
function call
classes
private
4. The stream extraction operator
base
>>
<<
semantics
5. Identifier or expression that is part of the calculation to be performed
operand value
binary operator
sorting
integer operands
6. The ________ of an identifier is the portion of the program in which the identifier can be used.
Unified Modeling Language(UML)
scope
dot (.)
function call
7. 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
base
type coercion
const
classes
8. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
whitespace
void pointer
cin >> variable
virtual functions
9. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
assignment
scope
object file
10. 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.
cmath
void
assignment
function overloading
11. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
public
pointer
Counter-controlled or definite
type
12. Symbol that denotes an action to be performed
/n
reserve words
operator
arithmetic expression
13. A filestream variable that represents the default output device
cout
&
unary operator
srand
14. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Semicolon
named constant
type casting (conversion)
globals
15. Executable version of program
object-oriented analysis and design (OOAD)
const
object file
operator overloading
16. A human readable file that contains C++ program
private
cmath
source file
unary operator
17. Associate an identifier with a memory location
allocating memory
base class
syntax
named constant
18. The size & shape & color and weight of an object are considered
operator overloading
#include
attributes
opened
19. * / % + -
Arithmetic Operators
object file
friend
polymorphism
20. 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
prompt
address
fstream
21. Classes can have relationships with other classes. These relationships are called ________.
associations
access specifier
Default memberwise assignment
::
22. The only integer that can be assigned directly to a pointer is_____________.
virtual functions
{ }
strcpy()
0
23. Grammar rules of the language; compiler will try to identify and locate syntax errors
unary operator
inline functions
/n
syntax
24. In inheritance the ____________ is the class that supplies the inherited members.
#include directive
base class
object-oriented analysis and design (OOAD)
?
25. Forces the computer to display decimal point and trailing zeroes
?
showpoint
sorting
static
26. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
local variable
reserve words
void
char
27. An expression in which all operands have the same data type - result will have the same data type as operands
unary scope resolution operator (::)
private
like-type expression
address
28. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
variables
selection
void pointer
named constant
29. = & | are examples of ____________.
unary scope resolution operator (::)
special symbols
setw
searching
30. A program that finds and attaches to your program the indicated libraries for compilation
if...else
private
if
preprocessor
31. A function is invoked with a ________.
member
function call
type coercion
classes
32. A file must be ________ before data can be written to or read from it.
endl (same as 'n')
opened
/n
strcpy()
33. Words that are used for special purposes in a program
n
reserved words
preprocessor
type
34. The process of analyzing and designing a system from an object-oriented point of view is called ________.
<<
pointer
Semicolon
object-oriented analysis and design (OOAD)
35. Returns the length of a string excluding the null terminator.
srand
access specifier
strlen()
::
36. 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.
variable
/n
semantics
main
37. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
cmath
const
reserve words
strcpy()
38. Preprocessor directive syntax
identifiers
#include <headerfilename>
comments
reserved words
39. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
heap
register
friend
loader
40. Sets floating-point values to a fixed decimal format
fixed
srand
two-dimensional
reserve words
41. To allow file access in a program you must #include this header file.
fstream
allocating memory
register
heap
42. newline
n
showpoint
rand
prompt
43. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
token
constant variable
assignment
private
44. Lists and tables of values can be stored in arrays or __________.
type casting (conversion)
vectors
reserved words
strlen()
45. A sequence of operands and operators that describe a calculation to be performed
strlen()
default constructor
arithmetic expression
definition
46. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
showpoint
base
assignment statement
47. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
strcpy()
&
Counter-controlled or definite
48. 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
endl (same as 'n')
escape sequences
constant variable
49. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
operand value
subscript (or index)
Unified Modeling Language(UML)
recursive function
50. directive A statement that starts with a # is called a ____________.
cin
token
Preprocessor
sorting