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.
&
selection
private
static_cast<char>(65)
2. Symbol that denotes an action to be performed
searching
{ }
operator
static_cast<char>(65)
3. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
subscript (or index)
Counter-controlled or definite
.cpp
#include
4. If a member initializer is not provided for a member object of a class the object's __________ is called.
assignment statement
static_cast<char>(65)
default constructor
scope resolution operator
5. 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.
cin.get(ch)
n
public
dot (.)
6. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
ofstream
globals
fstream
type casting (conversion)
7. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
function call
showpoint
semantics
delete
8. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
subscript (or index)
//
template
scope
9. A function is invoked with a ________.
base
private
function call
recursive function
10. The address-of operator. it is used to assign pointers and to print the address of variables.
&
/n
selection
a.out
11. The storage-class specifiers are mutable - auto - ________ - extern and static.
address
recursive function
register
left
12. Identifier or expression that is part of the calculation to be performed
operand value
<<
Literals
token
13. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
searching
Sentinel
return
static
14. int namespace include using return examples of ___________
endl (same as 'n')
reserve words
information hiding
access specifier
15. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
reserve words
variables
polymorphism
16. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
inheritance
operator
function scope
.cpp
17. 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.
vectors
?
cin >> variable
function call
18. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
classes
named constant
cmath
a.out
19. A file must be ________ before data can be written to or read from it.
unary scope resolution operator (::)
opened
srand
ofstream
20. newline
syntax
function overloading
n
unary scope resolution operator (::)
21. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
switch
cin >> variable
like-type expression
{ }
22. Use 2 characters to represent one
linker
0
associations
escape sequences
23. You must have a ___________ for every variable you intend to use in a program
variable
*
definition
scope resolution operator
24. Message displayed to the screen asking user for input; generated with an output statement
if
comments
prompt
new line
25. The stream extraction operator
>>
inheritance
new line
Default memberwise assignment
26. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
/n
function prototype
pointer
27. 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
28. Default name of executable file
named constant
reserved words
a.out
prompt
29. Two slash marks ( // ) indicate __________ of a comment
beginning
before
access specifier
named constant
30. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
?
Unified Modeling Language(UML)
switch
searching
31. A function ________ enables a single function to be defined to perform a task on many different data types.
setw
cin >> variable
template
heap
32. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
break
char
dot (.)
33. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
attributes
main
variables
token
34. Keyword public is a(n) _________
const datatype identifier = value
access specifier
object-oriented analysis and design (OOAD)
dot (.)
35. This manipulator is used to establish a field width for the value immediately following it.
n
type
<<
setw
36. The symbol for the binary scope resolution operator
associations
{ }
::
comments
37. A constant object must be __________; it cannot be modified after it is created.
stack
sorting
initialized
editor
38. The ________ statement in a called function passes the value of an expression back to the calling function.
return
beginning
before
initialized
39. A sequence of operands and operators that describe a calculation to be performed
function call
arithmetic expression
strcpy()
inline functions
40. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
token
register
variables
cout
41. The process of determining if an array contains a particular key value is called _________ the array.
searching
continue
member
special symbols
42. 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
unary scope resolution operator (::)
information hiding
type casting (conversion)
43. Names of things that are used in a program - can apply to variables & constants and functions
static_cast<char>(65)
semantics
char
identifiers
44. Every C++ statement ends with a(n) _________.
operator overloading
semicolon
void
showpoint
45. tab
Semicolon
t
const
left
46. All C++ Variables are_________.
&
case sensitive
selection
return
47. Executable version of program
inline functions
object file
associations
unary operator
48. Lists and tables of values can be stored in arrays or __________.
initialized
escape sequences
preprocessor
vectors
49. 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.
access specifier
operator overloading
continue
scope resolution operator
50. A pointer is a variable that contains as its value the____________ of another variable.
const datatype identifier = value
classes
address
static