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. C++ programs are normally typed into a computer using a(n) ________ program.
classes
0
?
editor
2. Keyword public is a(n) _________
identifiers
access specifier
Unified Modeling Language(UML)
friend
3. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
function parameters
unary operator
const datatype identifier = value
void
4. Compares two strings and returns 0 if they are equal.
strcmp()
friend
endl (same as 'n')
local variable
5. You must have a ___________ for every variable you intend to use in a program
dot (.)
definition
NULL
Default memberwise assignment
6. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
cout
variables
recursive
selection
7. An expression that has operands with different data types
associations
mixed expression
address
cmath
8. A human readable file that contains C++ program
named constant
globals
void
source file
9. Preprocessor directive syntax
Closing brace
#include <headerfilename>
template
variable
10. A type of pointer that can point at objects of any data type.
void pointer
global
address
a.out
11. A __________ data member represents class-wide information.
static
% modulus
if
&
12. The stream extraction operator
>>
function call
whitespace
address
13. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
heap
definition
0
14. The modulus operator (%) can be used only with __________.
friend
void
integer operands
beginning
15. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
like-type expression
break
reserved words
16. Operator with only one operand
unary operator
register
Sentinel
//
17. The _________ begins the body of every function and the _________ ends the body of every function.
&
cmath
Counter-controlled or definite
{ }
18. directive A statement that starts with a # is called a ____________.
Preprocessor
member
object file
&
19. Every C++ statement ends with a(n) _________.
cin >> variable
type casting (conversion)
semicolon
assignment statement
20. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
endl (same as 'n')
Unified Modeling Language(UML)
globals
whitespace
21. = & | are examples of ____________.
associations
special symbols
globals
reserved words
22. Creates a copy of a string.
auto
editor
strcpy()
static
23. Syntax for named constant declaration
preprocessor
const datatype identifier = value
Closing brace
identifiers
24. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
mixed expression
friend
virtual functions
classes
25. Program components in C++ are called functions and ________.
classes
inline functions
>>
function call
26. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
access specifier
function scope
object-oriented analysis and design (OOAD)
0
27. An array that uses two subscripts is referred to as a(n) _________ array.
t
heap
two-dimensional
&
28. Class members specified as _________ are accessible anywhere an object of the class is in scope.
base class
before
public
void
29. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
variable
register
linker
function parameters
30. int namespace include using return examples of ___________
mixed expression
static
reserve words
cout
31. The ________ of an identifier is the portion of the program in which the identifier can be used.
main
scope
assignment statement
operator overloading
32. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
globals
if...else
Arithmetic Operators
33. Characters used to separate symbols or reserved words or identifiers and statements
default constructor
cin
new line
whitespace
34. 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
35. Lists and tables of values can be stored in arrays or __________.
void pointer
operator
global
vectors
36. The only integer that can be assigned directly to a pointer is_____________.
object-oriented analysis and design (OOAD)
0
reserve words
break
37. The number used to refer to a particular element of an array is called its ________.
special symbols
static
subscript (or index)
<<
38. 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.
cout
/n
dot (.)
::
39. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
static
dot (.)
//
ofstream
40. These are data items whose values do not change while the program is running
semantics
Literals
subscript (or index)
break
41. Function ________ is used to set the random number seed to randomize a program.
srand
auto
template
associations
42. Two slash marks ( // ) indicate __________ of a comment
Stack overflow
operator overloading
<<
beginning
43. __________ can be used to assign an object of a class to another object of the same class.
*
Default memberwise assignment
static_cast<char>(65)
floating-point
44. The size & shape & color and weight of an object are considered
unary scope resolution operator (::)
syntax
classes
attributes
45. The ________ statement in a called function passes the value of an expression back to the calling function.
two-dimensional
Counter-controlled or definite
return
searching
46. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
case sensitive
pointer
#include
47. tab
Counter-controlled or definite
pointer
t
semicolon
48. Nonexecutable statements that are included in a program to provide information about what the program does etc.
new line
comments
integer operands
like-type expression
49. The ________ program transfers the executable image of a C++ program from disk to memory.
continue
inline functions
loader
stack
50. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
data type
showpoint
register
void