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. These are data items whose values do not change while the program is running
continue
Literals
preprocessor
delete
2. * / % + -
Arithmetic Operators
reserved words
fixed
strcmp()
3. Operator with two operands
binary operator
{ }
opened
dot (.)
4. newline
switch
left
n
ofstream
5. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
data type
Sentinel
?
base class
6. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
endl (same as 'n')
this
Unified Modeling Language(UML)
cout
7. You can declare default values for a function in the ____________________.
function parameters
whitespace
a.out
loader
8. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
delete
beginning
preprocessor
9. A filestream variable that represents the default output device
Counter-controlled or definite
linker
vectors
cout
10. An operator that can only be used with int values. result will always be an int.
dot (.)
% modulus
scope
cmath
11. Associate an identifier with a memory location
allocating memory
binary operator
object-oriented analysis and design (OOAD)
operator
12. The _________ begins the body of every function and the _________ ends the body of every function.
static
{ }
n
continue
13. int namespace include using return examples of ___________
reserve words
floating-point
return
getline
14. Every C++ program begins execution at the function _________.
main
scope resolution operator
floating-point
return
15. Used for function calls and local variables
stack
int values
derived class
Semicolon
16. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
heap
beginning
opened
17. A __________ should be used to declare the size of an array because it makes the program more scalable.
associations
operand value
const
constant variable
18. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
a.out
inline functions
ofstream
selection
19. Sets floating-point values to a fixed decimal format
stack
fixed
template
char
20. Characters used to separate symbols or reserved words or identifiers and statements
>>
whitespace
constant variable
cin
21. Every C++ statement ends with a(n) _________.
opened
cmath
semicolon
allocating memory
22. 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
vectors
integer operands
23. A function that can be used to read character data including whitespace
before
cin.get(ch)
object file
strcpy()
24. The only integer that can be assigned directly to a pointer is_____________.
scope resolution operator
0
initialized
subscript (or index)
25. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Unified Modeling Language(UML)
editor
scope resolution operator
function prototype
26. The ________ statement in a called function passes the value of an expression back to the calling function.
return
variable
integer operands
special symbols
27. A function ________ enables a single function to be defined to perform a task on many different data types.
//
template
#include <headerfilename>
fstream
28. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
t
base
auto
29. Whole numbers - no decimals and no commas included
member
attributes
cout
int values
30. Function ________ is used to set the random number seed to randomize a program.
t
type
register
srand
31. The process of placing the elements of an array in order is called ________ the array.
sorting
template
NULL
cmath
32. Operator with only one operand
variables
constant variable
fixed
unary operator
33. Member objects are constructed __________ their enclosing class object.
before
showpoint
prompt
pointer
34. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
strcmp()
Default memberwise assignment
heap
function overloading
35. 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.
new line
searching
/n
dot (.)
36. A variable declared outside any block or function is a ________ variable.
srand
virtual functions
global
overloading
37. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
private
const
fixed
38. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
::
auto
assignment
#include directive
39. This manipulator is used to establish a field width for the value immediately following it.
setw
void
classes
inline functions
40. Use 2 characters to represent one
cin
escape sequences
attributes
{ }
41. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
cout
information hiding
::
42. The symbol for the binary scope resolution operator
type
::
token
Preprocessor
43. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
binary operator
global
switch
named constant
44. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
overloading
//
variables
object-oriented analysis and design (OOAD)
45. The sign you use for pointers
t
return
rand
*
46. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
beginning
#include
static
47. 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
::
Sentinel
const
48. To allow file access in a program you must #include this header file.
fstream
recursive
unary scope resolution operator (::)
subscript (or index)
49. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
source file
semantics
sorting
void
50. = & | are examples of ____________.
function scope
special symbols
main
>>