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. Use 2 characters to represent one
subscript (or index)
escape sequences
access specifier
overloading
2. 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
/n
delete
3. The three values that can be used to initialize a pointer are 0 - __________ and an address.
allocating memory
/n
Stack overflow
NULL
4. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
switch
function overloading
if
integer operands
5. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
floating-point
inline functions
ofstream
6. 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.
initialized
information hiding
new line
0
7. Two slash marks ( // ) indicate __________ of a comment
continue
beginning
initialized
local variable
8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
&
0
overloading
data type
9. 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.
Closing brace
default constructor
inheritance
virtual functions
10. Classes can have relationships with other classes. These relationships are called ________.
Counter-controlled or definite
associations
inline functions
this
11. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
selection
break
#include
continue
12. The symbol for the binary scope resolution operator
::
reserve words
&
return
13. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
function parameters
sorting
opened
14. = & | are examples of ____________.
overloading
ofstream
special symbols
constant variable
15. tab
Sentinel
loader
whitespace
t
16. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
editor
strcmp()
classes
auto
17. A file must be ________ before data can be written to or read from it.
globals
opened
cin
new line
18. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
continue
//
int values
setw
19. Default name of executable file
a.out
member
cin >> variable
reserve words
20. The ________ enables access to a global variable with the same name as a variable in the current scope.
derived class
unary scope resolution operator (::)
opened
cmath
21. An expression that has operands with different data types
Default memberwise assignment
static
% modulus
mixed expression
22. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
.cpp
public
cin >> variable
allocating memory
23. A sequence of operands and operators that describe a calculation to be performed
preprocessor
arithmetic expression
data type
fixed
24. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
editor
strcmp()
object-oriented analysis and design (OOAD)
25. Most calculations are normally performed by ______ statements.
assignment
/n
selection
.cpp
26. directive A statement that starts with a # is called a ____________.
whitespace
Preprocessor
syntax
>>
27. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
Semicolon
associations
object file
#include
28. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
cin >> variable
Preprocessor
return
29. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
*
#include <headerfilename>
mixed expression
30. A type of pointer that can point at objects of any data type.
void pointer
assignment
return
>>
31. Forces the computer to display decimal point and trailing zeroes
vectors
showpoint
new line
operator overloading
32. A __________ data member represents class-wide information.
static
local variable
loader
data type
33. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
member
showpoint
srand
Stack overflow
34. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
void
static
Literals
35. All C++ Variables are_________.
fixed
Unified Modeling Language(UML)
case sensitive
non-static
36. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
preprocessor
function prototype
0
case sensitive
37. The sign you use for pointers
*
int values
global
switch
38. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
private
floating-point
inheritance
39. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
void
unary operator
semantics
n
40. The process of analyzing and designing a system from an object-oriented point of view is called ________.
showpoint
object-oriented analysis and design (OOAD)
address
break
41. A function that can be used to read character data including whitespace
named constant
cin.get(ch)
getline
function overloading
42. A variable that holds the address of another variable.
source file
access specifier
delete
pointer
43. Sets floating-point values to a fixed decimal format
assignment statement
fixed
?
if...else
44. Identifier or expression that is part of the calculation to be performed
operand value
type coercion
srand
fstream
45. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
left
preprocessor
token
data type
46. Operator with two operands
constant variable
two-dimensional
binary operator
Unified Modeling Language(UML)
47. To explicitly indicate that a value is to be converted to another type
variables
type casting (conversion)
template
selection
48. Every C++ statement ends with a(n) _________.
continue
semicolon
operand value
scope resolution operator
49. A filestream variable that represents the default input source
public
cin
NULL
vectors
50. A C++ statement that makes a decision is ______.
Default memberwise assignment
if
operator overloading
classes