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. Identifier or expression that is part of the calculation to be performed
static
operand value
strlen()
rand
2. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
sorting
function prototype
address
//
3. The ________ qualifier is used to declare read-only variables.
const
register
attributes
<<
4. In inheritance the ____________ is the class that supplies the inherited members.
void pointer
data type
function call
base class
5. The number used to refer to a particular element of an array is called its ________.
Default memberwise assignment
Closing brace
>>
subscript (or index)
6. All C++ Variables are_________.
Closing brace
return
case sensitive
floating-point
7. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
editor
a.out
token
selection
8. When a value of one data type is implicitly (automatically) changed to another data type
integer operands
::
type coercion
scope resolution operator
9. Sets floating-point values to a fixed decimal format
fixed
new line
like-type expression
information hiding
10. Most calculations are normally performed by ______ statements.
assignment
constant variable
heap
definition
11. The _____ causes the contents of another file to be inserted into a program.
#include directive
cin.get(ch)
friend
linker
12. Compares two strings and returns 0 if they are equal.
dot (.)
#include directive
strcmp()
t
13. Type casting syntax
derived class
selection
static_cast<char>(65)
::
14. __________ can be used to assign an object of a class to another object of the same class.
ofstream
Default memberwise assignment
type
initialized
15. Naming convention for C++ programs
.cpp
type coercion
rand
n
16. The address-of operator. it is used to assign pointers and to print the address of variables.
template
::
function prototype
&
17. Keyword public is a(n) _________
strlen()
access specifier
a.out
heap
18. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
semantics
left
reserved words
19. An expression in which all operands have the same data type - result will have the same data type as operands
strcpy()
like-type expression
named constant
strlen()
20. You can declare default values for a function in the ____________________.
function parameters
integer operands
strcmp()
vectors
21. The ________ statement in a called function passes the value of an expression back to the calling function.
inline functions
floating-point
const datatype identifier = value
return
22. newline
operator overloading
n
initialized
arithmetic expression
23. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
Default memberwise assignment
recursive
mixed expression
24. = & | are examples of ____________.
cout
unary scope resolution operator (::)
showpoint
special symbols
25. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
const datatype identifier = value
0
n
globals
26. A human readable file that contains C++ program
token
source file
derived class
this
27. A member function should be declared static if it does not access __________ class members.
endl (same as 'n')
non-static
constant variable
before
28. Allows the programmer to store a value in a variable
data type
return
continue
assignment statement
29. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
before
cin >> variable
inline functions
classes
30. This manipulator is used to establish a field width for the value immediately following it.
showpoint
setw
access specifier
identifiers
31. A function ________ enables a single function to be defined to perform a task on many different data types.
stack
template
const
pointer
32. The stream extraction operator
{ }
Stack overflow
opened
>>
33. A function is invoked with a ________.
initialized
function call
strlen()
strcpy()
34. 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.
strlen()
case sensitive
inheritance
recursive function
35. A set of values together with a set of operations
srand
preprocessor
arithmetic expression
data type
36. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
?
*
classes
function parameters
37. A pointer is a variable that contains as its value the____________ of another variable.
>>
linker
Default memberwise assignment
address
38. A program that finds and attaches to your program the indicated libraries for compilation
assignment
register
operand value
preprocessor
39. Message displayed to the screen asking user for input; generated with an output statement
semantics
constant variable
prompt
derived class
40. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
continue
allocating memory
unary operator
classes
41. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
reserved words
a.out
Counter-controlled or definite
42. Every C++ program begins execution at the function _________.
prompt
if...else
main
strcmp()
43. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
Semicolon
operator
.cpp
44. Classes can have relationships with other classes. These relationships are called ________.
two-dimensional
function overloading
opened
associations
45. The ________ program combines the output of the compiler with various library functions to produce an executable image.
ofstream
linker
Sentinel
void
46. Creates a copy of a string.
template
::
strcpy()
comments
47. All ______ must be declared before they are used.
linker
whitespace
constant variable
variables
48. The three values that can be used to initialize a pointer are 0 - __________ and an address.
variables
non-static
semantics
NULL
49. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
public
case sensitive
*
50. Operator with two operands
fstream
char
binary operator
stack