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 address-of operator. it is used to assign pointers and to print the address of variables.
#include directive
&
strlen()
before
2. Two slash marks ( // ) indicate __________ of a comment
globals
beginning
operand value
% modulus
3. * / % + -
floating-point
Arithmetic Operators
NULL
a.out
4. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
ofstream
//
polymorphism
register
5. The elements of an array are related by the fact that they have the same name and ___________.
data type
cin
type
*
6. Names of things that are used in a program - can apply to variables & constants and functions
setw
type coercion
object-oriented analysis and design (OOAD)
identifiers
7. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
inline functions
strcpy()
classes
static
8. 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
stack
return
classes
9. The size & shape & color and weight of an object are considered
attributes
return
Literals
comments
10. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
endl (same as 'n')
private
arithmetic expression
Semicolon
11. Initializers __________ must be used to initialize constant members of a class.
const
address
member
return
12. A function that calls itself
base
{ }
recursive function
Default memberwise assignment
13. Type casting syntax
linker
friend
% modulus
static_cast<char>(65)
14. The sign you use for pointers
<<
*
#include
object file
15. Used to qualify hidden names so that they can be used.
scope resolution operator
function prototype
{ }
selection
16. Allows the programmer to store a value in a variable
#include <headerfilename>
void
base
assignment statement
17. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
static
.cpp
Sentinel
friend
18. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
access specifier
data type
void pointer
function scope
19. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
address
friend
allocating memory
editor
20. int namespace include using return examples of ___________
Semicolon
type coercion
reserve words
a.out
21. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
source file
unary operator
function prototype
#include
22. A function ________ enables a single function to be defined to perform a task on many different data types.
template
classes
assignment statement
definition
23. These are data items whose values do not change while the program is running
left
base
object file
Literals
24. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
unary scope resolution operator (::)
fixed
token
scope
25. This manipulator is used to establish a field width for the value immediately following it.
setw
getline
static
auto
26. The idea that you can call the same function and the output will depend on the type of object you're using.
const datatype identifier = value
polymorphism
information hiding
virtual functions
27. A memory location with a name and data type - its content may be changed during program execution
variable
cmath
reserved words
initialized
28. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
#include <headerfilename>
searching
Counter-controlled or definite
29. The process of placing the elements of an array in order is called ________ the array.
mixed expression
sorting
template
const
30. To write data to a file you define an object of which one of the following
operator overloading
ofstream
pointer
dot (.)
31. All C++ Variables are_________.
semantics
strcmp()
case sensitive
register
32. The _________ begins the body of every function and the _________ ends the body of every function.
overloading
fixed
{ }
definition
33. To allow file access in a program you must #include this header file.
fstream
delete
&
showpoint
34. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
pointer
this
preprocessor
cin >> variable
35. A function is invoked with a ________.
int values
cin
function call
case sensitive
36. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
function prototype
&
escape sequences
const
37. Default name of executable file
int values
static
Sentinel
a.out
38. Operator with only one operand
register
allocating memory
unary operator
access specifier
39. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
linker
preprocessor
prompt
40. The symbol for the binary scope resolution operator
before
void
::
opened
41. A filestream variable that represents the default input source
type casting (conversion)
cin
?
arithmetic expression
42. The number used to refer to a particular element of an array is called its ________.
char
subscript (or index)
allocating memory
object-oriented analysis and design (OOAD)
43. Naming convention for C++ programs
Arithmetic Operators
non-static
if...else
.cpp
44. Whole numbers - no decimals and no commas included
classes
int values
stack
pointer
45. In inheritance the ____________ is the class that supplies the inherited members.
base class
void
fixed
searching
46. A __________ data member represents class-wide information.
ofstream
cin.get(ch)
function call
static
47. The storage-class specifiers are mutable - auto - ________ - extern and static.
function parameters
register
variable
type casting (conversion)
48. Preprocessor directive syntax
&
Default memberwise assignment
#include <headerfilename>
arithmetic expression
49. Repeating a set of instructions a specific number of times is called_________repetition.
NULL
syntax
t
Counter-controlled or definite
50. This is used to mark the end of a complete C++ programming statement.
fstream
Semicolon
assignment statement
return