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. Every C++ statement ends with a(n) _________.
if...else
before
assignment statement
semicolon
2. Words that are used for special purposes in a program
reserved words
int values
#include <headerfilename>
associations
3. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
template
new line
scope
sorting
4. Header file that contains commonly performed mathematical functions
register
definition
cmath
::
5. A variable that is known only within the function in which it is defined is called a ________.
static
recursive function
template
local variable
6. A set of values together with a set of operations
initialized
mixed expression
object file
data type
7. The size & shape & color and weight of an object are considered
attributes
{ }
static
preprocessor
8. Classes can have relationships with other classes. These relationships are called ________.
srand
data type
associations
linker
9. Two slash marks ( // ) indicate __________ of a comment
beginning
cin >> variable
void
public
10. An array that uses two subscripts is referred to as a(n) _________ array.
cin.get(ch)
escape sequences
base class
two-dimensional
11. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
.cpp
auto
Default memberwise assignment
12. A filestream variable that represents the default input source
cin
&
named constant
static
13. A variable declared outside any block or function is a ________ variable.
global
endl (same as 'n')
friend
allocating memory
14. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
polymorphism
operator overloading
/n
15. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
a.out
//
t
if
16. A ________ program executes before the compiler's translation phase begins.
Literals
cin
preprocessor
unary scope resolution operator (::)
17. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
arithmetic expression
linker
Unified Modeling Language(UML)
if...else
18. A sequence of operands and operators that describe a calculation to be performed
Unified Modeling Language(UML)
preprocessor
arithmetic expression
whitespace
19. The ________ program transfers the executable image of a C++ program from disk to memory.
assignment statement
type casting (conversion)
t
loader
20. The sign you use for references
base class
&
floating-point
semantics
21. 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.
function call
linker
cin
continue
22. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
0
named constant
Unified Modeling Language(UML)
scope resolution operator
23. The three values that can be used to initialize a pointer are 0 - __________ and an address.
unary operator
NULL
/n
searching
24. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
this
::
strlen()
25. The ________ of an identifier is the portion of the program in which the identifier can be used.
{ }
scope resolution operator
scope
searching
26. 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.
preprocessor
before
cmath
virtual functions
27. Repeating a set of instructions a specific number of times is called_________repetition.
subscript (or index)
Counter-controlled or definite
static_cast<char>(65)
semantics
28. The elements of an array are related by the fact that they have the same name and ___________.
Stack overflow
Unified Modeling Language(UML)
type
.cpp
29. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
operand value
overloading
information hiding
/n
30. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
escape sequences
t
n
31. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
heap
public
reserved words
#include
32. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
source file
auto
local variable
variables
33. Default name of executable file
const
a.out
int values
base
34. Type casting syntax
static_cast<char>(65)
token
const
default constructor
35. Forces the computer to display decimal point and trailing zeroes
int values
strcmp()
showpoint
Unified Modeling Language(UML)
36. 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.
two-dimensional
binary operator
static
reserved words
37. Message displayed to the screen asking user for input; generated with an output statement
fstream
attributes
this
prompt
38. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
linker
char
inline functions
#include
39. To allow file access in a program you must #include this header file.
cout
fstream
comments
private
40. Class members specified as _________ are accessible anywhere an object of the class is in scope.
information hiding
access specifier
public
type
41. The only integer that can be assigned directly to a pointer is_____________.
0
pointer
cout
before
42. Returns the length of a string excluding the null terminator.
inline functions
strlen()
void pointer
Default memberwise assignment
43. The process of placing the elements of an array in order is called ________ the array.
public
sorting
#include directive
binary operator
44. The stream insertion operator
<<
Preprocessor
associations
a.out
45. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
recursive function
variables
pointer
beginning
46. Use 2 characters to represent one
data type
escape sequences
mixed expression
non-static
47. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
int values
integer operands
n
48. A human readable file that contains C++ program
rand
static_cast<char>(65)
source file
semicolon
49. Lists and tables of values can be stored in arrays or __________.
register
vectors
scope resolution operator
delete
50. An expression in which all operands have the same data type - result will have the same data type as operands
linker
like-type expression
dot (.)
assignment statement