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. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
global
token
base
inline functions
2. A __________ data member represents class-wide information.
semantics
subscript (or index)
static
object-oriented analysis and design (OOAD)
3. The ________ statement in a called function passes the value of an expression back to the calling function.
Stack overflow
source file
object-oriented analysis and design (OOAD)
return
4. A variable declared outside any block or function is a ________ variable.
information hiding
auto
function scope
global
5. A member function should be declared static if it does not access __________ class members.
scope
Preprocessor
prompt
non-static
6. A variable that holds the address of another variable.
setw
/n
pointer
?
7. This manipulator is used to establish a field width for the value immediately following it.
object-oriented analysis and design (OOAD)
type coercion
setw
auto
8. In inheritance the ____________ is the class the receives the inherited members.
continue
const datatype identifier = value
floating-point
derived class
9. Compares two strings and returns 0 if they are equal.
data type
strcmp()
switch
n
10. tab
t
n
#include
delete
11. Function ________ is used to set the random number seed to randomize a program.
strcpy()
Arithmetic Operators
srand
recursive
12. A file must be ________ before data can be written to or read from it.
static
opened
srand
&
13. A program that finds and attaches to your program the indicated libraries for compilation
#include <headerfilename>
scope
preprocessor
heap
14. When a value of one data type is implicitly (automatically) changed to another data type
function parameters
type coercion
comments
before
15. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
continue
a.out
special symbols
static_cast<char>(65)
16. All ______ must be declared before they are used.
inline functions
variables
t
NULL
17. The process of determining if an array contains a particular key value is called _________ the array.
allocating memory
recursive function
searching
subscript (or index)
18. The sign you use for pointers
void pointer
floating-point
n
*
19. The process of analyzing and designing a system from an object-oriented point of view is called ________.
non-static
#include <headerfilename>
object-oriented analysis and design (OOAD)
getline
20. A set of values together with a set of operations
data type
preprocessor
return
//
21. data types that refer to numbers with decimals
function prototype
floating-point
void pointer
local variable
22. Executable version of program
#include
integer operands
object file
register
23. __________ can be used to assign an object of a class to another object of the same class.
srand
Default memberwise assignment
associations
const datatype identifier = value
24. A type of pointer that can point at objects of any data type.
associations
function overloading
derived class
void pointer
25. An array that uses two subscripts is referred to as a(n) _________ array.
&
template
two-dimensional
ofstream
26. The elements of an array are related by the fact that they have the same name and ___________.
::
escape sequences
type
inheritance
27. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
strlen()
selection
cin
beginning
28. The stream extraction operator
operator overloading
base class
>>
derived class
29. Operator with only one operand
unary operator
if...else
global
main
30. 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.
/n
void
static
semantics
31. The idea that you can call the same function and the output will depend on the type of object you're using.
::
access specifier
polymorphism
Literals
32. Every C++ statement ends with a(n) _________.
default constructor
semicolon
assignment
Counter-controlled or definite
33. Naming convention for C++ programs
member
virtual functions
fstream
.cpp
34. A function that can be used to read character data including whitespace
{ }
&
initialized
cin.get(ch)
35. 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.
strlen()
static
information hiding
void
36. Names of things that are used in a program - can apply to variables & constants and functions
assignment statement
identifiers
#include <headerfilename>
function overloading
37. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
unary scope resolution operator (::)
continue
overloading
linker
38. The ________ enables access to a global variable with the same name as a variable in the current scope.
Closing brace
unary scope resolution operator (::)
assignment statement
floating-point
39. This is used to mark the end of a complete C++ programming statement.
Semicolon
if...else
local variable
srand
40. Forces the computer to display decimal point and trailing zeroes
register
arithmetic expression
showpoint
initialized
41. C++ programs are normally typed into a computer using a(n) ________ program.
editor
recursive function
constant variable
Counter-controlled or definite
42. Message displayed to the screen asking user for input; generated with an output statement
void
Stack overflow
stack
prompt
43. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
Stack overflow
register
if...else
a.out
44. 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.
static
case sensitive
a.out
information hiding
45. The only integer that can be assigned directly to a pointer is_____________.
syntax
0
initialized
private
46. The _____ causes the contents of another file to be inserted into a program.
//
public
return
#include directive
47. An expression that has operands with different data types
constant variable
Sentinel
data type
mixed expression
48. * / % + -
Arithmetic Operators
escape sequences
classes
type coercion
49. A sequence of operands and operators that describe a calculation to be performed
operator overloading
arithmetic expression
opened
subscript (or index)
50. A filestream variable that represents the default output device
beginning
reserved words
Literals
cout