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. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
friend
Stack overflow
&
<<
2. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
comments
global
fixed
3. The stream insertion operator
void pointer
break
strcmp()
<<
4. Function ________ is used to produce random numbers.
unary operator
rand
if
identifiers
5. Forces the computer to display decimal point and trailing zeroes
editor
showpoint
static_cast<char>(65)
setw
6. Executable version of program
default constructor
void
variable
object file
7. Member objects are constructed __________ their enclosing class object.
function parameters
//
before
delete
8. Names of things that are used in a program - can apply to variables & constants and functions
cin.get(ch)
Literals
identifiers
continue
9. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
main
endl (same as 'n')
inheritance
globals
10. An expression that has operands with different data types
this
function parameters
variable
mixed expression
11. A constant object must be __________; it cannot be modified after it is created.
initialized
assignment
/n
n
12. The number used to refer to a particular element of an array is called its ________.
strcpy()
subscript (or index)
{ }
recursive
13. These are data items whose values do not change while the program is running
Literals
char
srand
pointer
14. Used to qualify hidden names so that they can be used.
floating-point
heap
editor
scope resolution operator
15. This manipulator is used to establish a field width for the value immediately following it.
sorting
setw
private
static
16. Words that are used for special purposes in a program
recursive function
if...else
const
reserved words
17. Used for function calls and local variables
semantics
derived class
named constant
stack
18. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
srand
semantics
static
getline
19. You can declare default values for a function in the ____________________.
reserve words
function parameters
cin
prompt
20. newline
Closing brace
n
opened
int values
21. The elements of an array are related by the fact that they have the same name and ___________.
break
identifiers
operator overloading
type
22. Message displayed to the screen asking user for input; generated with an output statement
Arithmetic Operators
mixed expression
prompt
type coercion
23. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
&
a.out
Semicolon
24. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
definition
heap
assignment statement
new line
25. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
reserved words
function prototype
base
static_cast<char>(65)
26. A ________ program executes before the compiler's translation phase begins.
preprocessor
classes
like-type expression
const datatype identifier = value
27. In inheritance the ____________ is the class that supplies the inherited members.
prompt
private
base class
auto
28. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
non-static
unary scope resolution operator (::)
cmath
private
29. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
default constructor
#include
.cpp
fixed
30. The ________ qualifier is used to declare read-only variables.
const
Counter-controlled or definite
Closing brace
NULL
31. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
operator
virtual functions
function parameters
classes
32. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
virtual functions
Arithmetic Operators
recursive
33. An expression in which all operands have the same data type - result will have the same data type as operands
selection
associations
like-type expression
&
34. The ________ of an identifier is the portion of the program in which the identifier can be used.
preprocessor
member
static
scope
35. The only integer that can be assigned directly to a pointer is_____________.
cin >> variable
allocating memory
object-oriented analysis and design (OOAD)
0
36. Every C++ program begins execution at the function _________.
function parameters
non-static
setw
main
37. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
const
recursive
?
void
38. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
const
initialized
mixed expression
39. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
srand
return
preprocessor
40. Whole numbers - no decimals and no commas included
named constant
void pointer
private
int values
41. Operator with two operands
#include
cin
setw
binary operator
42. directive A statement that starts with a # is called a ____________.
fstream
function overloading
Preprocessor
reserved words
43. If a member initializer is not provided for a member object of a class the object's __________ is called.
assignment
mixed expression
default constructor
int values
44. The process of analyzing and designing a system from an object-oriented point of view is called ________.
&
return
object-oriented analysis and design (OOAD)
overloading
45. Syntax for named constant declaration
binary operator
pointer
associations
const datatype identifier = value
46. All ______ must be declared before they are used.
variables
data type
dot (.)
function scope
47. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
opened
token
void
prompt
48. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
switch
void
sorting
overloading
49. The stream extraction operator
comments
>>
Default memberwise assignment
char
50. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
.cpp
variable
//