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 type of pointer that can point at objects of any data type.
type coercion
identifiers
strcmp()
void pointer
2. The process of analyzing and designing a system from an object-oriented point of view is called ________.
pointer
return
object-oriented analysis and design (OOAD)
comments
3. The process of determining if an array contains a particular key value is called _________ the array.
strcpy()
?
searching
stack
4. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
vectors
member
if...else
overloading
5. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
function prototype
endl (same as 'n')
address
break
6. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
semantics
0
*
globals
7. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
assignment
cin >> variable
information hiding
fixed
8. Function ________ is used to set the random number seed to randomize a program.
srand
private
escape sequences
fstream
9. The sign you use for pointers
>>
*
floating-point
//
10. Operator with two operands
non-static
Stack overflow
access specifier
binary operator
11. 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.
auto
heap
static
information hiding
12. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
token
Sentinel
semantics
operand value
13. To write data to a file you define an object of which one of the following
static
floating-point
comments
ofstream
14. This is used to mark the end of a complete C++ programming statement.
Closing brace
Semicolon
searching
virtual functions
15. The elements of an array are related by the fact that they have the same name and ___________.
two-dimensional
classes
definition
type
16. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
#include directive
NULL
register
whitespace
17. Program components in C++ are called functions and ________.
inheritance
classes
pointer
strlen()
18. The ________ statement in a called function passes the value of an expression back to the calling function.
friend
return
const datatype identifier = value
scope resolution operator
19. To allow file access in a program you must #include this header file.
cmath
token
static
fstream
20. Every C++ program begins execution at the function _________.
main
dot (.)
static_cast<char>(65)
floating-point
21. A constant object must be __________; it cannot be modified after it is created.
classes
definition
initialized
searching
22. This manipulator is used to establish a field width for the value immediately following it.
% modulus
setw
static
special symbols
23. Used for function calls and local variables
stack
two-dimensional
searching
like-type expression
24. A __________ data member represents class-wide information.
syntax
void
static
floating-point
25. Used to qualify hidden names so that they can be used.
data type
unary operator
rand
scope resolution operator
26. Every C++ statement ends with a(n) _________.
if
heap
initialized
semicolon
27. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
preprocessor
virtual functions
recursive function
28. Class members specified as _________ are accessible anywhere an object of the class is in scope.
associations
public
arithmetic expression
member
29. All C++ Variables are_________.
selection
<<
type casting (conversion)
case sensitive
30. For every opening brace in a C++ program there must be a ______________.
if...else
const
break
Closing brace
31. A function is invoked with a ________.
function call
&
#include
void
32. 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.
Literals
?
non-static
operand value
33. These are data items whose values do not change while the program is running
classes
editor
Literals
::
34. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
//
const datatype identifier = value
comments
35. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
before
friend
whitespace
operator overloading
36. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
inheritance
function prototype
identifiers
function overloading
37. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
continue
return
case sensitive
38. A function ________ enables a single function to be defined to perform a task on many different data types.
template
register
NULL
<<
39. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
if...else
allocating memory
token
global
40. The ________ of an identifier is the portion of the program in which the identifier can be used.
member
scope
strlen()
base class
41. The stream insertion operator
<<
assignment
private
derived class
42. Keyword public is a(n) _________
recursive
access specifier
source file
integer operands
43. The idea that you can call the same function and the output will depend on the type of object you're using.
base
static_cast<char>(65)
polymorphism
scope resolution operator
44. An array that uses two subscripts is referred to as a(n) _________ array.
syntax
#include <headerfilename>
two-dimensional
Literals
45. Returns the length of a string excluding the null terminator.
operator
void
strlen()
sorting
46. Used for dynamically allocated variables
t
heap
register
subscript (or index)
47. A pointer is a variable that contains as its value the____________ of another variable.
address
operand value
rand
integer operands
48. The ________ program transfers the executable image of a C++ program from disk to memory.
public
return
{ }
loader
49. The process of placing the elements of an array in order is called ________ the array.
reserved words
delete
polymorphism
sorting
50. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
vectors
const datatype identifier = value
dot (.)
object-oriented analysis and design (OOAD)