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. Executable version of program
object file
*
cout
const
2. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
const
auto
getline
return
3. tab
cin >> variable
two-dimensional
% modulus
t
4. Most calculations are normally performed by ______ statements.
::
assignment
#include <headerfilename>
continue
5. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
arithmetic expression
inline functions
preprocessor
scope resolution operator
6. The sign you use for references
base
before
&
t
7. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
friend
/n
editor
Literals
8. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
unary scope resolution operator (::)
<<
token
9. Every C++ program begins execution at the function _________.
main
setw
default constructor
variables
10. A member function should be declared static if it does not access __________ class members.
non-static
identifiers
type
<<
11. An expression that has operands with different data types
return
scope
source file
mixed expression
12. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
//
searching
stack
switch
13. This is used to mark the end of a complete C++ programming statement.
function parameters
Semicolon
linker
char
14. 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
return
access specifier
object-oriented analysis and design (OOAD)
15. Function ________ is used to produce random numbers.
non-static
::
#include <headerfilename>
rand
16. directive A statement that starts with a # is called a ____________.
unary scope resolution operator (::)
editor
Preprocessor
srand
17. The __________ operator reclaims memory previously allocated by new.
delete
void pointer
Stack overflow
assignment
18. Names of things that are used in a program - can apply to variables & constants and functions
cin >> variable
int values
fixed
identifiers
19. The elements of an array are related by the fact that they have the same name and ___________.
source file
type
/n
fixed
20. Used to qualify hidden names so that they can be used.
operator
scope resolution operator
this
base
21. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
preprocessor
register
break
Unified Modeling Language(UML)
22. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
initialized
semantics
globals
23. data types that refer to numbers with decimals
pointer
source file
allocating memory
floating-point
24. The ________ statement in a called function passes the value of an expression back to the calling function.
&
fixed
*
return
25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
inline functions
const
.cpp
operator overloading
26. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
static
const
Semicolon
preprocessor
27. Returns the length of a string excluding the null terminator.
attributes
base class
strlen()
assignment
28. The _________ begins the body of every function and the _________ ends the body of every function.
recursive function
inline functions
if...else
{ }
29. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
operand value
classes
Preprocessor
opened
30. The only integer that can be assigned directly to a pointer is_____________.
scope resolution operator
int values
0
overloading
31. The process of placing the elements of an array in order is called ________ the array.
sorting
::
beginning
n
32. These are data items whose values do not change while the program is running
case sensitive
type coercion
new line
Literals
33. 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
0
public
template
34. 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.
auto
virtual functions
type coercion
reserve words
35. The _____ causes the contents of another file to be inserted into a program.
constant variable
Semicolon
#include directive
const
36. C++ programs are normally typed into a computer using a(n) ________ program.
polymorphism
virtual functions
editor
cin
37. 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.
void
Counter-controlled or definite
cin
initialized
38. Operator with only one operand
strcmp()
reserve words
void
unary operator
39. Associate an identifier with a memory location
Stack overflow
allocating memory
strcpy()
static
40. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
>>
break
if...else
return
41. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
globals
sorting
classes
42. Keyword public is a(n) _________
const
polymorphism
access specifier
token
43. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
base class
base
comments
assignment statement
44. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
derived class
dot (.)
definition
45. Operator with two operands
sorting
binary operator
reserved words
syntax
46. 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.
prompt
?
floating-point
cin.get(ch)
47. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
pointer
operand value
template
48. The size & shape & color and weight of an object are considered
attributes
{ }
Counter-controlled or definite
like-type expression
49. Type casting syntax
like-type expression
sorting
static_cast<char>(65)
static
50. Program components in C++ are called functions and ________.
preprocessor
operand value
classes
before