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 variable that is known only within the function in which it is defined is called a ________.
two-dimensional
dot (.)
local variable
ofstream
2. Initializers __________ must be used to initialize constant members of a class.
member
non-static
return
<<
3. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
globals
char
showpoint
4. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
preprocessor
{ }
loader
5. The sign you use for references
&
function call
recursive function
subscript (or index)
6. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
attributes
setw
constant variable
7. Returns the length of a string excluding the null terminator.
scope
opened
strlen()
/n
8. Every C++ program begins execution at the function _________.
recursive
main
cin
Arithmetic Operators
9. Message displayed to the screen asking user for input; generated with an output statement
prompt
source file
cmath
classes
10. int namespace include using return examples of ___________
member
n
reserve words
cout
11. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
subscript (or index)
static
pointer
12. To allow file access in a program you must #include this header file.
.cpp
reserved words
fstream
source file
13. A filestream variable that represents the default input source
showpoint
assignment statement
dot (.)
cin
14. The __________ operator reclaims memory previously allocated by new.
delete
token
left
named constant
15. An array that uses two subscripts is referred to as a(n) _________ array.
token
associations
two-dimensional
static
16. The sign you use for pointers
comments
global
*
cin
17. The _____ causes the contents of another file to be inserted into a program.
#include directive
recursive
polymorphism
mixed expression
18. A function that can be used to read character data including whitespace
cin.get(ch)
whitespace
data type
#include directive
19. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
::
void
reserve words
const
20. A function ________ enables a single function to be defined to perform a task on many different data types.
default constructor
template
operator overloading
new line
21. The _________ begins the body of every function and the _________ ends the body of every function.
loader
{ }
like-type expression
strcmp()
22. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
cout
const
syntax
23. Forces the computer to display decimal point and trailing zeroes
showpoint
data type
const datatype identifier = value
friend
24. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
cout
member
function overloading
Arithmetic Operators
25. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
#include
int values
editor
26. Operator with two operands
binary operator
Closing brace
selection
source file
27. The elements of an array are related by the fact that they have the same name and ___________.
>>
recursive function
type
sorting
28. Words that are used for special purposes in a program
reserved words
non-static
access specifier
void pointer
29. The address-of operator. it is used to assign pointers and to print the address of variables.
attributes
&
floating-point
0
30. Allows the programmer to store a value in a variable
function call
if...else
assignment statement
associations
31. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
fixed
reserved words
type coercion
32. Compares two strings and returns 0 if they are equal.
strcmp()
//
#include directive
sorting
33. Preprocessor directive syntax
t
#include <headerfilename>
semantics
reserved words
34. 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
function call
static_cast<char>(65)
35. directive A statement that starts with a # is called a ____________.
Preprocessor
NULL
derived class
% modulus
36. A ________ program executes before the compiler's translation phase begins.
case sensitive
preprocessor
NULL
Semicolon
37. All ______ must be declared before they are used.
#include
variables
type coercion
int values
38. A human readable file that contains C++ program
comments
source file
searching
allocating memory
39. 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.
identifiers
virtual functions
showpoint
semicolon
40. 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.
fstream
Closing brace
Sentinel
scope resolution operator
41. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
searching
pointer
function call
operator overloading
42. The ________ program transfers the executable image of a C++ program from disk to memory.
setw
cmath
loader
function overloading
43. The stream extraction operator
>>
getline
loader
static
44. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
template
information hiding
function overloading
break
45. Causes the program to immediately goes back to the top of the loop. the remainder of the statements in the loop are ignored for this current iteration.
selection
constant variable
object file
continue
46. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
special symbols
Unified Modeling Language(UML)
const
assignment
47. data types that refer to numbers with decimals
information hiding
classes
floating-point
scope
48. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
data type
t
cmath
recursive
49. The ________ qualifier is used to declare read-only variables.
mixed expression
Arithmetic Operators
const
type coercion
50. Program components in C++ are called functions and ________.
fixed
assignment statement
classes
whitespace