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. A filestream variable that represents the default input source
cin
globals
beginning
t
2. An expression in which all operands have the same data type - result will have the same data type as operands
fixed
Sentinel
case sensitive
like-type expression
3. tab
beginning
t
stack
dot (.)
4. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
5. The sign you use for pointers
*
recursive
named constant
NULL
6. The ________ of an identifier is the portion of the program in which the identifier can be used.
pointer
scope
new line
classes
7. Associate an identifier with a memory location
cmath
delete
allocating memory
switch
8. Two slash marks ( // ) indicate __________ of a comment
beginning
local variable
pointer
endl (same as 'n')
9. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
>>
syntax
strlen()
10. Keyword public is a(n) _________
associations
sorting
private
access specifier
11. The __________ operator reclaims memory previously allocated by new.
type
delete
Stack overflow
integer operands
12. In inheritance the ____________ is the class the receives the inherited members.
getline
Closing brace
derived class
strcpy()
13. Type casting syntax
fstream
two-dimensional
static_cast<char>(65)
like-type expression
14. Compares two strings and returns 0 if they are equal.
strcmp()
mixed expression
variable
variables
15. An expression that has operands with different data types
integer operands
mixed expression
syntax
::
16. Classes can have relationships with other classes. These relationships are called ________.
*
named constant
auto
associations
17. The sign you use for references
*
&
public
source file
18. The modulus operator (%) can be used only with __________.
beginning
integer operands
n
<<
19. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
fstream
break
pointer
Preprocessor
20. Whole numbers - no decimals and no commas included
classes
binary operator
n
int values
21. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
associations
local variable
sorting
token
22. 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.
::
Sentinel
>>
a.out
23. newline
variable
return
n
srand
24. Used for dynamically allocated variables
heap
::
t
initialized
25. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
static_cast<char>(65)
new line
reserve words
setw
26. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
classes
n
Literals
27. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
classes
heap
preprocessor
break
28. The size & shape & color and weight of an object are considered
arithmetic expression
stack
#include <headerfilename>
attributes
29. A variable that is known only within the function in which it is defined is called a ________.
selection
local variable
t
private
30. All C++ Variables are_________.
friend
case sensitive
dot (.)
Semicolon
31. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
rand
type coercion
type casting (conversion)
operator overloading
32. An operator that can only be used with int values. result will always be an int.
setw
% modulus
virtual functions
selection
33. Executable version of program
heap
inline functions
object file
<<
34. A function ________ enables a single function to be defined to perform a task on many different data types.
before
template
pointer
preprocessor
35. The ________ program combines the output of the compiler with various library functions to produce an executable image.
semantics
linker
type
global
36. The address-of operator. it is used to assign pointers and to print the address of variables.
*
&
function parameters
virtual functions
37. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
polymorphism
Closing brace
recursive function
38. Initializers __________ must be used to initialize constant members of a class.
Closing brace
function prototype
showpoint
member
39. The process of placing the elements of an array in order is called ________ the array.
?
strcpy()
sorting
attributes
40. An array that uses two subscripts is referred to as a(n) _________ array.
fixed
two-dimensional
/n
unary scope resolution operator (::)
41. A C++ statement that makes a decision is ______.
mixed expression
type coercion
sorting
if
42. A sequence of operands and operators that describe a calculation to be performed
//
syntax
loader
arithmetic expression
43. Use 2 characters to represent one
return
*
address
escape sequences
44. Grammar rules of the language; compiler will try to identify and locate syntax errors
this
syntax
Literals
two-dimensional
45. A human readable file that contains C++ program
>>
source file
named constant
Semicolon
46. Used for function calls and local variables
comments
stack
getline
continue
47. 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.
operand value
before
definition
virtual functions
48. All ______ must be declared before they are used.
cin
variables
like-type expression
derived class
49. A file must be ________ before data can be written to or read from it.
opened
delete
recursive
strcpy()
50. The ________ enables access to a global variable with the same name as a variable in the current scope.
function parameters
endl (same as 'n')
unary scope resolution operator (::)
static_cast<char>(65)