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. 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.
information hiding
assignment statement
sorting
named constant
2. This manipulator causes the field to be left-justified with padding spaces printed to the right.
% modulus
left
Preprocessor
endl (same as 'n')
3. This manipulator is used to establish a field width for the value immediately following it.
cin
setw
template
virtual functions
4. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
overloading
information hiding
strcpy()
5. The ________ statement in a called function passes the value of an expression back to the calling function.
global
return
#include
unary operator
6. A file must be ________ before data can be written to or read from it.
prompt
global
opened
dot (.)
7. 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.
continue
void
global
like-type expression
8. Default name of executable file
a.out
n
reserved words
rand
9. A variable that is known only within the function in which it is defined is called a ________.
local variable
cin.get(ch)
Closing brace
Semicolon
10. C++ programs are normally typed into a computer using a(n) ________ program.
editor
private
char
ofstream
11. A function is invoked with a ________.
>>
type coercion
unary scope resolution operator (::)
function call
12. Program components in C++ are called functions and ________.
auto
cout
vectors
classes
13. The ________ of an identifier is the portion of the program in which the identifier can be used.
non-static
template
source file
scope
14. 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.
?
private
case sensitive
cin
15. A variable declared outside any block or function is a ________ variable.
t
return
like-type expression
global
16. Two slash marks ( // ) indicate __________ of a comment
syntax
setw
beginning
strcpy()
17. 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.
cmath
two-dimensional
linker
/n
18. Sets floating-point values to a fixed decimal format
int values
operator
fixed
subscript (or index)
19. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
showpoint
beginning
#include <headerfilename>
switch
20. Returns the length of a string excluding the null terminator.
global
strlen()
cmath
stack
21. 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.
fixed
% modulus
subscript (or index)
static
22. Nonexecutable statements that are included in a program to provide information about what the program does etc.
initialized
showpoint
comments
left
23. Characters used to separate symbols or reserved words or identifiers and statements
recursive
new line
whitespace
register
24. * / % + -
/n
searching
pointer
Arithmetic Operators
25. Member objects are constructed __________ their enclosing class object.
token
before
fstream
address
26. Identifier or expression that is part of the calculation to be performed
information hiding
operand value
<<
searching
27. The ________ qualifier is used to declare read-only variables.
{ }
comments
const
whitespace
28. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
break
whitespace
operand value
29. Naming convention for C++ programs
.cpp
endl (same as 'n')
access specifier
Default memberwise assignment
30. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
Unified Modeling Language(UML)
private
token
Stack overflow
31. directive A statement that starts with a # is called a ____________.
classes
integer operands
Default memberwise assignment
Preprocessor
32. A ________ program executes before the compiler's translation phase begins.
auto
scope
preprocessor
function call
33. 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.
Stack overflow
static
function overloading
virtual functions
34. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
token
prompt
recursive
cout
35. Use 2 characters to represent one
escape sequences
cout
operator
operand value
36. newline
function overloading
type
n
global
37. A sequence of operands and operators that describe a calculation to be performed
//
Semicolon
void
arithmetic expression
38. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
like-type expression
static_cast<char>(65)
&
39. To explicitly indicate that a value is to be converted to another type
n
function prototype
type casting (conversion)
const
40. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
before
cin
comments
return
41. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
variables
if
Unified Modeling Language(UML)
overloading
42. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
Semicolon
>>
function parameters
43. The stream insertion operator
semantics
polymorphism
binary operator
<<
44. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
base
{ }
overloading
int values
45. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
derived class
setw
if...else
switch
46. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
47. A __________ should be used to declare the size of an array because it makes the program more scalable.
semicolon
constant variable
#include
?
48. The storage-class specifiers are mutable - auto - ________ - extern and static.
scope resolution operator
local variable
register
.cpp
49. A __________ data member represents class-wide information.
object file
static
reserved words
definition
50. 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.
function overloading
static
floating-point
inheritance