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. You can declare default values for a function in the ____________________.
special symbols
function parameters
int values
//
2. Header file that contains commonly performed mathematical functions
cmath
function overloading
cin
void pointer
3. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
setw
operand value
#include
const
4. 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.
whitespace
comments
Sentinel
unary scope resolution operator (::)
5. Returns the length of a string excluding the null terminator.
const datatype identifier = value
strlen()
data type
return
6. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
.cpp
vectors
//
7. All ______ must be declared before they are used.
stack
variables
sorting
vectors
8. The process of analyzing and designing a system from an object-oriented point of view is called ________.
fixed
operand value
char
object-oriented analysis and design (OOAD)
9. 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.
/n
Literals
template
searching
10. An array that uses two subscripts is referred to as a(n) _________ array.
classes
Counter-controlled or definite
two-dimensional
if...else
11. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
special symbols
unary operator
void
12. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
function call
operand value
endl (same as 'n')
#include
13. The ________ program combines the output of the compiler with various library functions to produce an executable image.
base class
Sentinel
global
linker
14. All C++ Variables are_________.
variable
stack
subscript (or index)
case sensitive
15. 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.
constant variable
if...else
static
friend
16. The storage-class specifiers are mutable - auto - ________ - extern and static.
return
{ }
vectors
register
17. 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.
register
virtual functions
void
operator
18. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
cin.get(ch)
Unified Modeling Language(UML)
friend
function call
19. 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.
loader
inheritance
dot (.)
t
20. To write data to a file you define an object of which one of the following
srand
ofstream
Literals
function prototype
21. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
return
#include
escape sequences
22. Operator with two operands
scope resolution operator
editor
binary operator
Default memberwise assignment
23. Keyword public is a(n) _________
searching
reserve words
stack
access specifier
24. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
::
private
#include <headerfilename>
void
25. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
a.out
cin >> variable
register
26. Program components in C++ are called functions and ________.
two-dimensional
non-static
classes
base class
27. Words that are used for special purposes in a program
reserved words
pointer
Sentinel
/n
28. A program that finds and attaches to your program the indicated libraries for compilation
rand
selection
setw
preprocessor
29. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
linker
unary operator
static
30. A C++ statement that makes a decision is ______.
token
assignment statement
if
global
31. The ________ program transfers the executable image of a C++ program from disk to memory.
break
inheritance
loader
fixed
32. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
overloading
fixed
operator overloading
33. Forces the computer to display decimal point and trailing zeroes
source file
showpoint
const datatype identifier = value
pointer
34. Executable version of program
object file
void
linker
operator
35. The _____ causes the contents of another file to be inserted into a program.
n
preprocessor
#include directive
base
36. Default name of executable file
a.out
cout
inheritance
named constant
37. The modulus operator (%) can be used only with __________.
new line
named constant
integer operands
unary operator
38. If a member initializer is not provided for a member object of a class the object's __________ is called.
non-static
Unified Modeling Language(UML)
if
default constructor
39. A variable that holds the address of another variable.
% modulus
constant variable
return
pointer
40. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
continue
//
strlen()
static_cast<char>(65)
41. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
fstream
assignment statement
return
42. Characters used to separate symbols or reserved words or identifiers and statements
prompt
type coercion
function parameters
whitespace
43. The address-of operator. it is used to assign pointers and to print the address of variables.
operand value
&
fstream
like-type expression
44. The stream extraction operator
scope
>>
constant variable
associations
45. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
const
fixed
0
46. The ________ of an identifier is the portion of the program in which the identifier can be used.
associations
allocating memory
break
scope
47. Lists and tables of values can be stored in arrays or __________.
pointer
vectors
fstream
&
48. A type of pointer that can point at objects of any data type.
this
void pointer
cin
::
49. Sets floating-point values to a fixed decimal format
fixed
cin.get(ch)
endl (same as 'n')
searching
50. int namespace include using return examples of ___________
<<
two-dimensional
reserve words
type