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 only integer that can be assigned directly to a pointer is_____________.
recursive
strcmp()
0
if
2. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
virtual functions
cin
definition
3. 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.
two-dimensional
srand
strcmp()
inheritance
4. A file must be ________ before data can be written to or read from it.
opened
classes
operand value
beginning
5. A member function should be declared static if it does not access __________ class members.
arithmetic expression
type coercion
non-static
register
6. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
auto
Counter-controlled or definite
register
associations
7. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
derived class
whitespace
cin >> variable
overloading
8. Whole numbers - no decimals and no commas included
recursive function
/n
>>
int values
9. int namespace include using return examples of ___________
reserve words
unary operator
base
t
10. Lists and tables of values can be stored in arrays or __________.
Sentinel
{ }
scope
vectors
11. 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.
special symbols
continue
beginning
rand
12. 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.
break
semantics
void
//
13. Used to qualify hidden names so that they can be used.
strcpy()
scope resolution operator
t
source file
14. A human readable file that contains C++ program
cin.get(ch)
access specifier
?
source file
15. A variable that is known only within the function in which it is defined is called a ________.
floating-point
getline
local variable
derived class
16. The process of determining if an array contains a particular key value is called _________ the array.
stack
overloading
vectors
searching
17. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
unary operator
comments
function overloading
private
18. Header file that contains commonly performed mathematical functions
cmath
getline
auto
global
19. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
cin >> variable
NULL
#include <headerfilename>
char
20. All C++ Variables are_________.
case sensitive
type coercion
<<
semantics
21. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
syntax
const datatype identifier = value
Semicolon
recursive
22. For every opening brace in a C++ program there must be a ______________.
static
return
Closing brace
a.out
23. Grammar rules of the language; compiler will try to identify and locate syntax errors
recursive function
syntax
loader
inheritance
24. When a value of one data type is implicitly (automatically) changed to another data type
operator
semicolon
scope
type coercion
25. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
variable
endl (same as 'n')
whitespace
26. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
Preprocessor
left
overloading
function call
27. Most calculations are normally performed by ______ statements.
preprocessor
assignment
register
type casting (conversion)
28. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
dot (.)
named constant
source file
data type
29. Returns the length of a string excluding the null terminator.
scope resolution operator
strlen()
vectors
attributes
30. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
#include
classes
*
address
31. tab
t
base class
const datatype identifier = value
setw
32. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
cout
main
ofstream
void
33. Operator with two operands
binary operator
operator
polymorphism
scope resolution operator
34. 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.
main
initialized
arithmetic expression
information hiding
35. The stream insertion operator
<<
% modulus
mixed expression
this
36. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
const
integer operands
searching
getline
37. 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.
strlen()
globals
dot (.)
void pointer
38. The ________ statement in a called function passes the value of an expression back to the calling function.
static
Arithmetic Operators
strcmp()
return
39. Naming convention for C++ programs
template
.cpp
function overloading
syntax
40. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
int values
>>
private
new line
41. A constant object must be __________; it cannot be modified after it is created.
continue
initialized
showpoint
Unified Modeling Language(UML)
42. The ________ program combines the output of the compiler with various library functions to produce an executable image.
syntax
linker
left
searching
43. Classes can have relationships with other classes. These relationships are called ________.
Closing brace
associations
beginning
return
44. To explicitly indicate that a value is to be converted to another type
data type
type casting (conversion)
operator
const
45. Nonexecutable statements that are included in a program to provide information about what the program does etc.
prompt
comments
main
loader
46. The number used to refer to a particular element of an array is called its ________.
>>
subscript (or index)
preprocessor
left
47. To allow file access in a program you must #include this header file.
data type
new line
fstream
attributes
48. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
register
template
left
49. data types that refer to numbers with decimals
*
assignment statement
//
floating-point
50. Message displayed to the screen asking user for input; generated with an output statement
unary scope resolution operator (::)
prompt
derived class
local variable