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 six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
/n
strcpy()
escape sequences
function scope
2. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
classes
token
inline functions
information hiding
3. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
constant variable
editor
const
4. Member objects are constructed __________ their enclosing class object.
before
int values
auto
access specifier
5. The number used to refer to a particular element of an array is called its ________.
initialized
two-dimensional
subscript (or index)
binary operator
6. Preprocessor directive syntax
identifiers
#include
#include <headerfilename>
continue
7. A variable that is known only within the function in which it is defined is called a ________.
local variable
searching
constant variable
source file
8. Names of things that are used in a program - can apply to variables & constants and functions
register
int values
void pointer
identifiers
9. A variable that holds the address of another variable.
access specifier
allocating memory
default constructor
pointer
10. Executable version of program
break
object file
vectors
definition
11. The stream extraction operator
derived class
>>
fixed
prompt
12. Lists and tables of values can be stored in arrays or __________.
vectors
comments
like-type expression
type
13. The sign you use for pointers
*
classes
beginning
named constant
14. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
strcmp()
inline functions
/n
NULL
15. A memory location with a name and data type - its content may be changed during program execution
constant variable
>>
special symbols
variable
16. Header file that contains commonly performed mathematical functions
loader
0
#include directive
cmath
17. Used for function calls and local variables
srand
stack
% modulus
non-static
18. The sign you use for references
arithmetic expression
Preprocessor
&
static_cast<char>(65)
19. The ________ program combines the output of the compiler with various library functions to produce an executable image.
globals
recursive function
semantics
linker
20. A variable declared outside any block or function is a ________ variable.
global
this
semantics
type coercion
21. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
source file
Literals
//
int values
22. Sets floating-point values to a fixed decimal format
scope resolution operator
loader
Semicolon
fixed
23. Allows the programmer to store a value in a variable
assignment statement
friend
showpoint
delete
24. Program components in C++ are called functions and ________.
semicolon
type coercion
classes
Arithmetic Operators
25. An expression in which all operands have the same data type - result will have the same data type as operands
semicolon
new line
like-type expression
syntax
26. Operator with only one operand
Default memberwise assignment
allocating memory
const datatype identifier = value
unary operator
27. Used for dynamically allocated variables
member
heap
&
void
28. In inheritance the ____________ is the class the receives the inherited members.
main
fixed
prompt
derived class
29. This manipulator is used to establish a field width for the value immediately following it.
dot (.)
setw
#include
function scope
30. A function that can be used to read character data including whitespace
auto
cin.get(ch)
continue
unary operator
31. Characters used to separate symbols or reserved words or identifiers and statements
return
preprocessor
whitespace
Closing brace
32. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
if...else
switch
reserve words
object-oriented analysis and design (OOAD)
33. Nonexecutable statements that are included in a program to provide information about what the program does etc.
Preprocessor
comments
preprocessor
editor
34. 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.
void
subscript (or index)
0
default constructor
35. The ________ of an identifier is the portion of the program in which the identifier can be used.
source file
scope
left
&
36. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
//
semicolon
void pointer
37. Whole numbers - no decimals and no commas included
before
int values
unary operator
strlen()
38. A member function should be declared static if it does not access __________ class members.
non-static
object file
reserved words
&
39. tab
t
left
#include <headerfilename>
n
40. The stream insertion operator
cin
function scope
<<
token
41. This manipulator causes the field to be left-justified with padding spaces printed to the right.
unary scope resolution operator (::)
like-type expression
left
operator
42. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
polymorphism
pointer
allocating memory
fixed
43. A function that calls itself
subscript (or index)
function prototype
const
recursive function
44. The ________ statement in a called function passes the value of an expression back to the calling function.
Counter-controlled or definite
friend
return
integer operands
45. data types that refer to numbers with decimals
cout
floating-point
{ }
showpoint
46. The ________ enables access to a global variable with the same name as a variable in the current scope.
char
overloading
linker
unary scope resolution operator (::)
47. This is used to mark the end of a complete C++ programming statement.
&
Semicolon
dot (.)
cin.get(ch)
48. A function is invoked with a ________.
function call
showpoint
main
globals
49. 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.
integer operands
dot (.)
operand value
::
50. Used to qualify hidden names so that they can be used.
scope resolution operator
function call
editor
char