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 stream insertion operator
base
<<
Counter-controlled or definite
//
2. The idea that you can call the same function and the output will depend on the type of object you're using.
variables
Unified Modeling Language(UML)
void
polymorphism
3. To write data to a file you define an object of which one of the following
ofstream
two-dimensional
unary operator
left
4. This is used to mark the end of a complete C++ programming statement.
auto
Semicolon
operator overloading
beginning
5. A type of pointer that can point at objects of any data type.
void pointer
operator
case sensitive
if...else
6. The ________ of an identifier is the portion of the program in which the identifier can be used.
0
function call
scope
auto
7. To allow file access in a program you must #include this header file.
fstream
overloading
globals
rand
8. Names of things that are used in a program - can apply to variables & constants and functions
base class
Default memberwise assignment
identifiers
NULL
9. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
integer operands
scope resolution operator
function overloading
main
10. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
static
if
switch
11. Characters used to separate symbols or reserved words or identifiers and statements
Unified Modeling Language(UML)
arithmetic expression
showpoint
whitespace
12. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
function call
const datatype identifier = value
{ }
const
13. Forces the computer to display decimal point and trailing zeroes
const datatype identifier = value
showpoint
if
cin
14. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
recursive function
recursive
floating-point
15. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
globals
object file
delete
16. The storage-class specifiers are mutable - auto - ________ - extern and static.
preprocessor
srand
register
special symbols
17. A variable that holds the address of another variable.
assignment
operator overloading
pointer
inline functions
18. An expression that has operands with different data types
Sentinel
static
integer operands
mixed expression
19. An operator that can only be used with int values. result will always be an int.
% modulus
access specifier
function parameters
semicolon
20. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Arithmetic Operators
function prototype
reserved words
loader
21. Class members specified as _________ are accessible anywhere an object of the class is in scope.
void pointer
selection
public
type casting (conversion)
22. The address-of operator. it is used to assign pointers and to print the address of variables.
?
return
Counter-controlled or definite
&
23. 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.
two-dimensional
cin
Semicolon
void
24. A function ________ enables a single function to be defined to perform a task on many different data types.
variables
::
template
inheritance
25. Allows the programmer to store a value in a variable
reserve words
Closing brace
assignment statement
scope
26. = & | are examples of ____________.
special symbols
register
fstream
#include directive
27. Program components in C++ are called functions and ________.
const
classes
comments
void pointer
28. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
main
derived class
return
29. 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.
information hiding
delete
#include <headerfilename>
strcmp()
30. Use 2 characters to represent one
Literals
0
Counter-controlled or definite
escape sequences
31. A set of values together with a set of operations
stack
data type
switch
Unified Modeling Language(UML)
32. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
public
//
main
33. These are data items whose values do not change while the program is running
const
Sentinel
recursive
Literals
34. When a value of one data type is implicitly (automatically) changed to another data type
function call
polymorphism
type coercion
?
35. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
local variable
strcmp()
attributes
semantics
36. Returns the length of a string excluding the null terminator.
variables
strlen()
floating-point
showpoint
37. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
associations
//
setw
private
38. The only integer that can be assigned directly to a pointer is_____________.
operator
0
heap
pointer
39. 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
dot (.)
named constant
base
recursive
40. In inheritance the ____________ is the class that supplies the inherited members.
stack
arithmetic expression
base class
searching
41. A filestream variable that represents the default input source
comments
&
cin
if...else
42. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
syntax
friend
inheritance
private
43. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
cin
switch
attributes
before
44. Message displayed to the screen asking user for input; generated with an output statement
beginning
break
arithmetic expression
prompt
45. Grammar rules of the language; compiler will try to identify and locate syntax errors
classes
Unified Modeling Language(UML)
syntax
cmath
46. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
function parameters
special symbols
whitespace
47. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
#include directive
object file
arithmetic expression
48. Repeating a set of instructions a specific number of times is called_________repetition.
source file
token
initialized
Counter-controlled or definite
49. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
cin.get(ch)
allocating memory
derived class
50. Syntax for named constant declaration
initialized
public
const datatype identifier = value
Arithmetic Operators