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. The size & shape & color and weight of an object are considered
preprocessor
attributes
?
member
2. Compares two strings and returns 0 if they are equal.
reserve words
default constructor
strcmp()
object file
3. A function that calls itself
&
break
recursive function
constant variable
4. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
member
token
polymorphism
strlen()
5. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
opened
static_cast<char>(65)
variable
6. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
heap
binary operator
before
getline
7. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
loader
globals
getline
.cpp
8. Function ________ is used to produce random numbers.
rand
selection
//
*
9. 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
base
derived class
function prototype
const
10. A pointer is a variable that contains as its value the____________ of another variable.
escape sequences
address
pointer
fixed
11. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
escape sequences
if...else
register
const
12. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
function overloading
stack
cin.get(ch)
13. A constant object must be __________; it cannot be modified after it is created.
virtual functions
mixed expression
initialized
attributes
14. = & | are examples of ____________.
srand
special symbols
member
Arithmetic Operators
15. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
register
pointer
opened
/n
16. Nonexecutable statements that are included in a program to provide information about what the program does etc.
vectors
base
Arithmetic Operators
comments
17. tab
token
register
polymorphism
t
18. Every C++ statement ends with a(n) _________.
strcmp()
semicolon
auto
globals
19. Operator with two operands
return
default constructor
function parameters
binary operator
20. Operator with only one operand
.cpp
two-dimensional
whitespace
unary operator
21. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
inline functions
inheritance
overloading
selection
22. * / % + -
Default memberwise assignment
Arithmetic Operators
endl (same as 'n')
derived class
23. Repeating a set of instructions a specific number of times is called_________repetition.
t
Counter-controlled or definite
floating-point
function scope
24. Two slash marks ( // ) indicate __________ of a comment
beginning
semantics
void
variable
25. Every C++ program begins execution at the function _________.
getline
main
&
auto
26. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
type coercion
stack
inheritance
operator overloading
27. The process of determining if an array contains a particular key value is called _________ the array.
return
preprocessor
searching
if
28. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
void pointer
whitespace
Arithmetic Operators
29. 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.
{ }
information hiding
loader
semicolon
30. An operator that can only be used with int values. result will always be an int.
% modulus
switch
subscript (or index)
globals
31. A function that can be used to read character data including whitespace
recursive
strcpy()
cin.get(ch)
new line
32. Used to qualify hidden names so that they can be used.
scope resolution operator
data type
Closing brace
static
33. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
Preprocessor
two-dimensional
const
34. The idea that you can call the same function and the output will depend on the type of object you're using.
function overloading
type
polymorphism
unary scope resolution operator (::)
35. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
escape sequences
private
semantics
token
36. 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.
.cpp
Preprocessor
unary scope resolution operator (::)
continue
37. Identifier or expression that is part of the calculation to be performed
scope
scope resolution operator
cin.get(ch)
operand value
38. Words that are used for special purposes in a program
reserved words
comments
int values
strcpy()
39. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
register
int values
Default memberwise assignment
inline functions
40. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
globals
special symbols
#include
recursive function
41. Header file that contains commonly performed mathematical functions
continue
cmath
dot (.)
function overloading
42. A variable declared outside any block or function is a ________ variable.
continue
global
const
vectors
43. A __________ data member represents class-wide information.
t
associations
friend
static
44. data types that refer to numbers with decimals
floating-point
cin.get(ch)
return
globals
45. You can declare default values for a function in the ____________________.
attributes
<<
Arithmetic Operators
function parameters
46. Syntax for named constant declaration
const datatype identifier = value
static
mixed expression
before
47. Names of things that are used in a program - can apply to variables & constants and functions
% modulus
derived class
Stack overflow
identifiers
48. You must have a ___________ for every variable you intend to use in a program
#include directive
fixed
Closing brace
definition
49. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
selection
floating-point
integer operands
50. A variable that is known only within the function in which it is defined is called a ________.
Default memberwise assignment
object-oriented analysis and design (OOAD)
local variable
base