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 set of values together with a set of operations
n
data type
cin >> variable
stack
2. The elements of an array are related by the fact that they have the same name and ___________.
this
semantics
?
type
3. 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.
void pointer
address
Sentinel
before
4. 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.
function call
static
.cpp
n
5. Default name of executable file
globals
a.out
object file
editor
6. Keyword public is a(n) _________
static
delete
access specifier
Closing brace
7. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
rand
Semicolon
reserved words
8. A function that can be used to read character data including whitespace
cin.get(ch)
type
variables
>>
9. Lists and tables of values can be stored in arrays or __________.
a.out
Semicolon
inline functions
vectors
10. The __________ operator reclaims memory previously allocated by new.
if
delete
Counter-controlled or definite
t
11. Nonexecutable statements that are included in a program to provide information about what the program does etc.
reserved words
Stack overflow
comments
classes
12. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
base class
prompt
classes
object-oriented analysis and design (OOAD)
13. A file must be ________ before data can be written to or read from it.
setw
opened
&
before
14. In inheritance the ____________ is the class the receives the inherited members.
Counter-controlled or definite
operator
derived class
ofstream
15. This manipulator is used to establish a field width for the value immediately following it.
setw
return
cmath
fixed
16. tab
beginning
allocating memory
switch
t
17. C++ programs are normally typed into a computer using a(n) ________ program.
allocating memory
editor
unary operator
const datatype identifier = value
18. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
{ }
const
Unified Modeling Language(UML)
reserve words
19. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
before
setw
token
cin
20. Every C++ program begins execution at the function _________.
% modulus
function call
main
void
21. The sign you use for references
/n
&
Semicolon
.cpp
22. Most calculations are normally performed by ______ statements.
data type
this
assignment
mixed expression
23. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
linker
return
t
operand value
24. A program that finds and attaches to your program the indicated libraries for compilation
inline functions
operator overloading
constant variable
preprocessor
25. Sets floating-point values to a fixed decimal format
<<
void
scope resolution operator
fixed
26. An array that uses two subscripts is referred to as a(n) _________ array.
semantics
two-dimensional
cmath
left
27. Used to qualify hidden names so that they can be used.
scope resolution operator
return
non-static
?
28. 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.
type casting (conversion)
continue
Preprocessor
type
29. A variable declared outside any block or function is a ________ variable.
int values
binary operator
recursive function
global
30. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
member
syntax
Stack overflow
{ }
31. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
switch
rand
cin.get(ch)
inline functions
32. This manipulator causes the field to be left-justified with padding spaces printed to the right.
polymorphism
token
fstream
left
33. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
cout
attributes
semicolon
//
34. Characters used to separate symbols or reserved words or identifiers and statements
sorting
whitespace
preprocessor
type coercion
35. A filestream variable that represents the default input source
cin
?
showpoint
stack
36. A function that calls itself
recursive function
unary operator
identifiers
special symbols
37. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
case sensitive
type
function overloading
preprocessor
38. The address-of operator. it is used to assign pointers and to print the address of variables.
strlen()
register
&
identifiers
39. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
dot (.)
classes
&
40. data types that refer to numbers with decimals
static
void pointer
floating-point
NULL
41. 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.
function call
information hiding
data type
type
42. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
Closing brace
<<
register
ofstream
43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
object file
globals
const datatype identifier = value
dot (.)
44. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
initialized
private
local variable
cmath
45. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
Unified Modeling Language(UML)
prompt
cin >> variable
operator overloading
46. 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.
escape sequences
delete
initialized
void
47. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
register
#include
return
operand value
48. __________ can be used to assign an object of a class to another object of the same class.
derived class
Default memberwise assignment
inline functions
global
49. An expression that has operands with different data types
cin >> variable
mixed expression
a.out
break
50. Use 2 characters to represent one
escape sequences
register
case sensitive
type casting (conversion)