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 number used to refer to a particular element of an array is called its ________.
subscript (or index)
break
auto
operator overloading
2. A variable that is known only within the function in which it is defined is called a ________.
reserve words
local variable
pointer
derived class
3. A filestream variable that represents the default input source
associations
main
cin
Stack overflow
4. The ________ qualifier is used to declare read-only variables.
/n
const
like-type expression
data type
5. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
whitespace
::
floating-point
6. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
definition
continue
unary operator
7. directive A statement that starts with a # is called a ____________.
inheritance
Sentinel
associations
Preprocessor
8. Use 2 characters to represent one
sorting
escape sequences
access specifier
linker
9. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
Counter-controlled or definite
friend
function overloading
10. Lists and tables of values can be stored in arrays or __________.
vectors
derived class
new line
operator
11. All ______ must be declared before they are used.
if
showpoint
variables
preprocessor
12. A file must be ________ before data can be written to or read from it.
global
register
virtual functions
opened
13. Returns the length of a string excluding the null terminator.
strlen()
syntax
Stack overflow
variables
14. = & | are examples of ____________.
{ }
register
special symbols
preprocessor
15. A type of pointer that can point at objects of any data type.
function scope
void pointer
template
type coercion
16. The stream extraction operator
function call
operand value
>>
global
17. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
syntax
special symbols
0
auto
18. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
strcpy()
named constant
private
token
19. A ________ program executes before the compiler's translation phase begins.
syntax
mixed expression
whitespace
preprocessor
20. Header file that contains commonly performed mathematical functions
floating-point
recursive
associations
cmath
21. A __________ should be used to declare the size of an array because it makes the program more scalable.
operand value
classes
Default memberwise assignment
constant variable
22. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
operator overloading
classes
function parameters
reserve words
23. Keyword public is a(n) _________
selection
endl (same as 'n')
function scope
access specifier
24. A constant object must be __________; it cannot be modified after it is created.
showpoint
initialized
constant variable
vectors
25. data types that refer to numbers with decimals
cin
continue
prompt
floating-point
26. The __________ operator reclaims memory previously allocated by new.
associations
delete
assignment statement
register
27. Member objects are constructed __________ their enclosing class object.
before
subscript (or index)
char
scope resolution operator
28. A pointer is a variable that contains as its value the____________ of another variable.
ofstream
address
classes
return
29. The address-of operator. it is used to assign pointers and to print the address of variables.
const
&
*
non-static
30. A function that calls itself
data type
&
*
recursive function
31. Sets floating-point values to a fixed decimal format
global
fixed
srand
#include
32. Nonexecutable statements that are included in a program to provide information about what the program does etc.
.cpp
return
void pointer
comments
33. Default name of executable file
a.out
attributes
variables
opened
34. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
like-type expression
void pointer
two-dimensional
Stack overflow
35. The three values that can be used to initialize a pointer are 0 - __________ and an address.
0
NULL
comments
default constructor
36. The _____ causes the contents of another file to be inserted into a program.
public
integer operands
#include directive
function call
37. Symbol that denotes an action to be performed
operator
linker
stack
vectors
38. The sign you use for references
cin >> variable
source file
&
binary operator
39. Syntax for named constant declaration
const datatype identifier = value
static_cast<char>(65)
if...else
fstream
40. A function ________ enables a single function to be defined to perform a task on many different data types.
template
arithmetic expression
void
&
41. Classes can have relationships with other classes. These relationships are called ________.
strcpy()
void
unary scope resolution operator (::)
associations
42. Grammar rules of the language; compiler will try to identify and locate syntax errors
virtual functions
?
syntax
register
43. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
int values
break
?
operator overloading
44. Initializers __________ must be used to initialize constant members of a class.
derived class
member
>>
&
45. An operator that can only be used with int values. result will always be an int.
fixed
% modulus
function parameters
semantics
46. A __________ data member represents class-wide information.
cin
variables
reserved words
static
47. Names of things that are used in a program - can apply to variables & constants and functions
assignment statement
identifiers
variable
before
48. 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.
operand value
&
inheritance
friend
49. A variable that holds the address of another variable.
operand value
polymorphism
const
pointer
50. The ________ enables access to a global variable with the same name as a variable in the current scope.
Counter-controlled or definite
unary scope resolution operator (::)
int values
const datatype identifier = value