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. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
linker
polymorphism
?
2. Class members specified as _________ are accessible anywhere an object of the class is in scope.
Preprocessor
Closing brace
char
public
3. Message displayed to the screen asking user for input; generated with an output statement
public
token
prompt
#include directive
4. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
associations
floating-point
semicolon
if...else
5. A filestream variable that represents the default output device
template
{ }
derived class
cout
6. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
case sensitive
Unified Modeling Language(UML)
switch
binary operator
7. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
cin.get(ch)
#include
object file
this
8. An array that uses two subscripts is referred to as a(n) _________ array.
>>
two-dimensional
new line
strcmp()
9. Initializers __________ must be used to initialize constant members of a class.
Preprocessor
member
function scope
dot (.)
10. A human readable file that contains C++ program
whitespace
Arithmetic Operators
type casting (conversion)
source file
11. Words that are used for special purposes in a program
Unified Modeling Language(UML)
*
named constant
reserved words
12. The address-of operator. it is used to assign pointers and to print the address of variables.
heap
function overloading
assignment statement
&
13. newline
private
information hiding
n
object file
14. tab
t
/n
named constant
void
15. A file must be ________ before data can be written to or read from it.
int values
opened
register
rand
16. The three values that can be used to initialize a pointer are 0 - __________ and an address.
stack
srand
NULL
local variable
17. These are data items whose values do not change while the program is running
case sensitive
break
scope
Literals
18. Two slash marks ( // ) indicate __________ of a comment
getline
beginning
scope resolution operator
&
19. An expression in which all operands have the same data type - result will have the same data type as operands
cmath
a.out
like-type expression
recursive
20. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
overloading
const
inline functions
Stack overflow
21. 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
//
constant variable
associations
22. 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.
function overloading
virtual functions
pointer
friend
23. Preprocessor directive syntax
#include <headerfilename>
preprocessor
recursive function
non-static
24. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
inheritance
initialized
pointer
auto
25. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
/n
function overloading
left
cmath
26. Classes can have relationships with other classes. These relationships are called ________.
function parameters
Arithmetic Operators
&
associations
27. data types that refer to numbers with decimals
loader
char
setw
floating-point
28. When a value of one data type is implicitly (automatically) changed to another data type
stack
#include directive
integer operands
type coercion
29. Program components in C++ are called functions and ________.
const datatype identifier = value
named constant
classes
Closing brace
30. All C++ Variables are_________.
?
case sensitive
function scope
function parameters
31. To write data to a file you define an object of which one of the following
% modulus
if...else
ofstream
recursive
32. All ______ must be declared before they are used.
function prototype
heap
before
variables
33. A ________ program executes before the compiler's translation phase begins.
allocating memory
Stack overflow
preprocessor
auto
34. Executable version of program
Arithmetic Operators
continue
friend
object file
35. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
inline functions
named constant
initialized
operator
36. 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.
fixed
prompt
continue
cin >> variable
37. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
syntax
new line
overloading
function scope
38. Header file that contains commonly performed mathematical functions
new line
operand value
const datatype identifier = value
cmath
39. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
Stack overflow
&
Semicolon
40. A member function should be declared static if it does not access __________ class members.
char
private
object-oriented analysis and design (OOAD)
non-static
41. 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.
srand
escape sequences
void
selection
42. C++ programs are normally typed into a computer using a(n) ________ program.
Unified Modeling Language(UML)
operator overloading
if...else
editor
43. A function that can be used to read character data including whitespace
globals
variables
cin.get(ch)
local variable
44. The ________ program combines the output of the compiler with various library functions to produce an executable image.
case sensitive
linker
auto
non-static
45. Used for function calls and local variables
type coercion
void pointer
stack
cin >> variable
46. Syntax for named constant declaration
function scope
endl (same as 'n')
inheritance
const datatype identifier = value
47. Characters used to separate symbols or reserved words or identifiers and statements
opened
prompt
case sensitive
whitespace
48. This is used to mark the end of a complete C++ programming statement.
auto
Stack overflow
Semicolon
editor
49. Compares two strings and returns 0 if they are equal.
loader
two-dimensional
strcmp()
>>
50. A memory location with a name and data type - its content may be changed during program execution
derived class
variable
fstream
operator