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. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
strcmp()
template
srand
2. Member objects are constructed __________ their enclosing class object.
before
function call
static_cast<char>(65)
new line
3. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
floating-point
prompt
case sensitive
classes
4. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
>>
register
if...else
address
5. The elements of an array are related by the fact that they have the same name and ___________.
const
register
dot (.)
type
6. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
public
attributes
continue
cin >> variable
7. The process of analyzing and designing a system from an object-oriented point of view is called ________.
vectors
object-oriented analysis and design (OOAD)
this
left
8. Operator with only one operand
classes
unary operator
source file
Arithmetic Operators
9. The __________ operator reclaims memory previously allocated by new.
delete
operator overloading
0
assignment
10. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
11. A human readable file that contains C++ program
dot (.)
information hiding
Sentinel
source file
12. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
type
unary scope resolution operator (::)
inline functions
whitespace
13. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
allocating memory
pointer
variable
14. A __________ should be used to declare the size of an array because it makes the program more scalable.
inline functions
scope
constant variable
heap
15. Names of things that are used in a program - can apply to variables & constants and functions
inline functions
public
identifiers
mixed expression
16. All ______ must be declared before they are used.
Semicolon
?
subscript (or index)
variables
17. Allows the programmer to store a value in a variable
>>
fstream
assignment statement
polymorphism
18. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
allocating memory
a.out
delete
19. You must have a ___________ for every variable you intend to use in a program
static
linker
definition
source file
20. The process of determining if an array contains a particular key value is called _________ the array.
searching
const
function scope
Literals
21. Lists and tables of values can be stored in arrays or __________.
vectors
Preprocessor
function scope
operator
22. A program that finds and attaches to your program the indicated libraries for compilation
syntax
preprocessor
scope
return
23. A filestream variable that represents the default output device
derived class
binary operator
cout
scope
24. Grammar rules of the language; compiler will try to identify and locate syntax errors
reserved words
syntax
delete
function scope
25. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
dot (.)
reserved words
operator
26. The symbol for the binary scope resolution operator
unary operator
::
recursive
cin.get(ch)
27. tab
showpoint
scope resolution operator
identifiers
t
28. A variable that holds the address of another variable.
pointer
like-type expression
endl (same as 'n')
static_cast<char>(65)
29. You can declare default values for a function in the ____________________.
type casting (conversion)
n
sorting
function parameters
30. Type casting syntax
::
static_cast<char>(65)
getline
escape sequences
31. Initializers __________ must be used to initialize constant members of a class.
associations
template
cmath
member
32. The stream extraction operator
>>
strcmp()
if...else
identifiers
33. Every C++ statement ends with a(n) _________.
initialized
semicolon
unary operator
classes
34. Default name of executable file
polymorphism
a.out
Closing brace
{ }
35. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
type casting (conversion)
overloading
unary operator
showpoint
36. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
virtual functions
break
preprocessor
non-static
37. These are data items whose values do not change while the program is running
preprocessor
inline functions
Literals
searching
38. An array that uses two subscripts is referred to as a(n) _________ array.
like-type expression
#include <headerfilename>
Default memberwise assignment
two-dimensional
39. The ________ program combines the output of the compiler with various library functions to produce an executable image.
semicolon
linker
function parameters
const
40. Identifier or expression that is part of the calculation to be performed
0
operand value
syntax
definition
41. 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.
register
member
static
base class
42. A filestream variable that represents the default input source
cin
?
n
::
43. In inheritance the ____________ is the class the receives the inherited members.
static
subscript (or index)
derived class
void
44. A function is invoked with a ________.
fixed
endl (same as 'n')
register
function call
45. Returns the length of a string excluding the null terminator.
recursive function
strlen()
switch
*
46. * / % + -
private
Arithmetic Operators
opened
default constructor
47. A sequence of operands and operators that describe a calculation to be performed
default constructor
allocating memory
arithmetic expression
constant variable
48. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
editor
attributes
fixed
char
49. The sign you use for pointers
*
const
friend
member
50. The size & shape & color and weight of an object are considered
case sensitive
attributes
Arithmetic Operators
special symbols