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 ________ statement in a called function passes the value of an expression back to the calling function.
return
register
floating-point
char
2. Compares two strings and returns 0 if they are equal.
strcmp()
Sentinel
prompt
function prototype
3. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
new line
virtual functions
preprocessor
Unified Modeling Language(UML)
4. A filestream variable that represents the default output device
t
information hiding
cout
type
5. A set of values together with a set of operations
.cpp
data type
overloading
editor
6. * / % + -
mixed expression
pointer
::
Arithmetic Operators
7. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
like-type expression
unary scope resolution operator (::)
access specifier
8. A file must be ________ before data can be written to or read from it.
function overloading
Closing brace
opened
allocating memory
9. Executable version of program
object file
allocating memory
continue
Stack overflow
10. Forces the computer to display decimal point and trailing zeroes
function parameters
showpoint
inheritance
{ }
11. = & | are examples of ____________.
static_cast<char>(65)
special symbols
non-static
#include directive
12. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
searching
char
left
function parameters
13. An expression that has operands with different data types
like-type expression
NULL
mixed expression
subscript (or index)
14. The number used to refer to a particular element of an array is called its ________.
&
unary operator
subscript (or index)
global
15. Header file that contains commonly performed mathematical functions
cmath
object file
const
dot (.)
16. To write data to a file you define an object of which one of the following
before
access specifier
ofstream
&
17. 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.
heap
static
*
Arithmetic Operators
18. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
loader
left
reserve words
this
19. newline
linker
derived class
0
n
20. A memory location with a name and data type - its content may be changed during program execution
assignment
Default memberwise assignment
char
variable
21. Default name of executable file
<<
delete
static_cast<char>(65)
a.out
22. A pointer is a variable that contains as its value the____________ of another variable.
{ }
n
address
unary operator
23. A function that can be used to read character data including whitespace
strcpy()
switch
cin.get(ch)
register
24. A variable that is known only within the function in which it is defined is called a ________.
#include <headerfilename>
unary operator
Arithmetic Operators
local variable
25. The symbol for the binary scope resolution operator
Arithmetic Operators
variable
case sensitive
::
26. Associate an identifier with a memory location
mixed expression
Unified Modeling Language(UML)
allocating memory
char
27. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
case sensitive
named constant
//
auto
28. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
n
source file
const
arithmetic expression
29. For every opening brace in a C++ program there must be a ______________.
function overloading
semicolon
operator
Closing brace
30. Most calculations are normally performed by ______ statements.
a.out
mixed expression
>>
assignment
31. The modulus operator (%) can be used only with __________.
auto
integer operands
const datatype identifier = value
loader
32. A human readable file that contains C++ program
endl (same as 'n')
global
NULL
source file
33. Returns the length of a string excluding the null terminator.
strlen()
recursive
classes
Closing brace
34. This manipulator is used to establish a field width for the value immediately following it.
setw
attributes
source file
::
35. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
Arithmetic Operators
before
semicolon
//
36. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
static_cast<char>(65)
fixed
named constant
37. All ______ must be declared before they are used.
variables
Arithmetic Operators
linker
srand
38. Symbol that denotes an action to be performed
if...else
operator
public
vectors
39. Whole numbers - no decimals and no commas included
char
int values
void
if...else
40. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
Unified Modeling Language(UML)
two-dimensional
data type
41. Sets floating-point values to a fixed decimal format
fixed
void
static
assignment
42. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
static_cast<char>(65)
static
break
43. A type of pointer that can point at objects of any data type.
escape sequences
Literals
void pointer
break
44. directive A statement that starts with a # is called a ____________.
unary operator
auto
object-oriented analysis and design (OOAD)
Preprocessor
45. A constant object must be __________; it cannot be modified after it is created.
mixed expression
initialized
void
function overloading
46. Naming convention for C++ programs
/n
member
.cpp
escape sequences
47. A __________ should be used to declare the size of an array because it makes the program more scalable.
reserve words
/n
operator overloading
constant variable
48. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
Default memberwise assignment
auto
main
Counter-controlled or definite
49. Words that are used for special purposes in a program
information hiding
constant variable
reserved words
Unified Modeling Language(UML)
50. You must have a ___________ for every variable you intend to use in a program
definition
/n
strcpy()
selection