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. This manipulator is used to establish a field width for the value immediately following it.
setw
preprocessor
strcpy()
return
2. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
reserve words
register
pointer
operator
3. The sign you use for references
initialized
new line
&
/n
4. To explicitly indicate that a value is to be converted to another type
main
{ }
type casting (conversion)
access specifier
5. tab
<<
t
type casting (conversion)
Stack overflow
6. This is used to mark the end of a complete C++ programming statement.
Semicolon
left
#include <headerfilename>
const datatype identifier = value
7. Sets floating-point values to a fixed decimal format
strlen()
heap
recursive function
fixed
8. 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.
opened
attributes
static
recursive
9. You must have a ___________ for every variable you intend to use in a program
definition
main
data type
#include <headerfilename>
10. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
information hiding
private
&
overloading
11. The symbol for the binary scope resolution operator
associations
classes
const
::
12. Initializers __________ must be used to initialize constant members of a class.
return
member
unary operator
subscript (or index)
13. = & | are examples of ____________.
const
scope resolution operator
special symbols
if
14. An expression that has operands with different data types
fstream
recursive
mixed expression
cin.get(ch)
15. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
semicolon
reserved words
Preprocessor
16. Allows the programmer to store a value in a variable
Unified Modeling Language(UML)
polymorphism
strcpy()
assignment statement
17. The sign you use for pointers
static
cin.get(ch)
void
*
18. Used for dynamically allocated variables
member
scope
heap
n
19. The process of analyzing and designing a system from an object-oriented point of view is called ________.
operator overloading
variables
object-oriented analysis and design (OOAD)
default constructor
20. A type of pointer that can point at objects of any data type.
private
object-oriented analysis and design (OOAD)
void pointer
address
21. A member function should be declared static if it does not access __________ class members.
ofstream
preprocessor
non-static
&
22. The number used to refer to a particular element of an array is called its ________.
integer operands
subscript (or index)
static_cast<char>(65)
void pointer
23. 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.
Arithmetic Operators
Sentinel
source file
editor
24. Forces the computer to display decimal point and trailing zeroes
Closing brace
global
void
showpoint
25. Syntax for named constant declaration
const datatype identifier = value
reserved words
whitespace
function overloading
26. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
t
#include
pointer
27. A sequence of operands and operators that describe a calculation to be performed
case sensitive
scope
static_cast<char>(65)
arithmetic expression
28. Function ________ is used to set the random number seed to randomize a program.
srand
assignment
rand
mixed expression
29. Two slash marks ( // ) indicate __________ of a comment
beginning
fstream
if
template
30. 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
static_cast<char>(65)
mixed expression
<<
31. 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.
Default memberwise assignment
identifiers
virtual functions
static_cast<char>(65)
32. Default name of executable file
a.out
like-type expression
scope
type casting (conversion)
33. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
Preprocessor
0
object file
34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
main
initialized
associations
new line
35. All ______ must be declared before they are used.
variables
a.out
>>
register
36. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
const
strcmp()
function overloading
37. 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
editor
type casting (conversion)
unary scope resolution operator (::)
38. A set of values together with a set of operations
data type
Counter-controlled or definite
member
classes
39. Grammar rules of the language; compiler will try to identify and locate syntax errors
global
#include <headerfilename>
fixed
syntax
40. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
scope
like-type expression
syntax
41. A human readable file that contains C++ program
% modulus
source file
return
reserve words
42. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
sorting
variables
Preprocessor
43. Lists and tables of values can be stored in arrays or __________.
named constant
vectors
integer operands
left
44. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
strcpy()
n
auto
selection
45. A variable declared outside any block or function is a ________ variable.
base class
editor
globals
global
46. Associate an identifier with a memory location
recursive function
*
recursive
allocating memory
47. A filestream variable that represents the default output device
cout
type coercion
main
like-type expression
48. A variable that is known only within the function in which it is defined is called a ________.
variables
local variable
syntax
const
49. A program that finds and attaches to your program the indicated libraries for compilation
Arithmetic Operators
preprocessor
assignment
const datatype identifier = value
50. The idea that you can call the same function and the output will depend on the type of object you're using.
virtual functions
function scope
register
polymorphism