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. Used for dynamically allocated variables
fstream
heap
associations
non-static
2. This is used to mark the end of a complete C++ programming statement.
dot (.)
operator
Semicolon
identifiers
3. A sequence of operands and operators that describe a calculation to be performed
operator
cin
arithmetic expression
member
4. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
associations
recursive
continue
dot (.)
5. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
integer operands
sorting
left
classes
6. The __________ operator reclaims memory previously allocated by new.
new line
delete
const datatype identifier = value
variables
7. Forces the computer to display decimal point and trailing zeroes
showpoint
beginning
Closing brace
default constructor
8. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
inline functions
getline
floating-point
friend
9. The address-of operator. it is used to assign pointers and to print the address of variables.
% modulus
&
virtual functions
Closing brace
10. Used to qualify hidden names so that they can be used.
function overloading
semantics
Closing brace
scope resolution operator
11. 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
preprocessor
type coercion
t
12. The ________ of an identifier is the portion of the program in which the identifier can be used.
object file
scope
information hiding
&
13. C++ programs are normally typed into a computer using a(n) ________ program.
editor
char
cin.get(ch)
base
14. A variable that is known only within the function in which it is defined is called a ________.
Closing brace
local variable
two-dimensional
function call
15. The three values that can be used to initialize a pointer are 0 - __________ and an address.
static
fixed
Closing brace
NULL
16. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
prompt
classes
recursive function
17. You must have a ___________ for every variable you intend to use in a program
&
derived class
definition
assignment statement
18. A file must be ________ before data can be written to or read from it.
opened
setw
cin.get(ch)
Closing brace
19. Default name of executable file
special symbols
a.out
subscript (or index)
data type
20. A filestream variable that represents the default output device
scope
cout
beginning
two-dimensional
21. Program components in C++ are called functions and ________.
default constructor
register
cout
classes
22. A type of pointer that can point at objects of any data type.
n
Stack overflow
void pointer
default constructor
23. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
named constant
sorting
function parameters
24. When a value of one data type is implicitly (automatically) changed to another data type
globals
#include directive
0
type coercion
25. Words that are used for special purposes in a program
>>
before
selection
reserved words
26. An operator that can only be used with int values. result will always be an int.
% modulus
<<
special symbols
NULL
27. Header file that contains commonly performed mathematical functions
cmath
function scope
sorting
prompt
28. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
virtual functions
#include directive
selection
floating-point
29. The only integer that can be assigned directly to a pointer is_____________.
0
return
information hiding
?
30. The symbol for the binary scope resolution operator
setw
escape sequences
static
::
31. A variable that holds the address of another variable.
rand
char
?
pointer
32. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
whitespace
identifiers
Stack overflow
void
33. A ________ program executes before the compiler's translation phase begins.
assignment
default constructor
semicolon
preprocessor
34. * / % + -
#include directive
Arithmetic Operators
globals
object file
35. A memory location with a name and data type - its content may be changed during program execution
named constant
reserved words
beginning
variable
36. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
classes
pointer
scope
inheritance
37. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
::
overloading
return
Closing brace
38. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
integer operands
auto
t
mixed expression
39. int namespace include using return examples of ___________
information hiding
Closing brace
reserve words
comments
40. This manipulator is used to establish a field width for the value immediately following it.
static_cast<char>(65)
return
setw
void pointer
41. The number used to refer to a particular element of an array is called its ________.
?
subscript (or index)
semantics
Semicolon
42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
derived class
overloading
Stack overflow
43. newline
beginning
n
default constructor
whitespace
44. A program that finds and attaches to your program the indicated libraries for compilation
heap
a.out
function scope
preprocessor
45. The process of determining if an array contains a particular key value is called _________ the array.
function overloading
searching
object file
classes
46. A variable declared outside any block or function is a ________ variable.
recursive
loader
non-static
global
47. The _________ begins the body of every function and the _________ ends the body of every function.
function call
{ }
classes
member
48. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
static
recursive function
vectors
operator overloading
49. Whole numbers - no decimals and no commas included
source file
int values
register
private
50. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
case sensitive
private
semicolon
int values