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. An expression in which all operands have the same data type - result will have the same data type as operands
type
main
&
like-type expression
2. The number used to refer to a particular element of an array is called its ________.
fstream
escape sequences
strcpy()
subscript (or index)
3. Returns the length of a string excluding the null terminator.
Closing brace
<<
strlen()
register
4. The sign you use for references
syntax
&
semicolon
object-oriented analysis and design (OOAD)
5. 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
function call
semicolon
derived class
6. Whole numbers - no decimals and no commas included
strcpy()
base
named constant
int values
7. The ________ program combines the output of the compiler with various library functions to produce an executable image.
comments
initialized
Stack overflow
linker
8. = & | are examples of ____________.
binary operator
inheritance
special symbols
address
9. A function ________ enables a single function to be defined to perform a task on many different data types.
return
template
left
Literals
10. For every opening brace in a C++ program there must be a ______________.
::
void pointer
function call
Closing brace
11. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
selection
new line
syntax
Unified Modeling Language(UML)
12. This manipulator is used to establish a field width for the value immediately following it.
cin >> variable
function scope
a.out
setw
13. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
return
identifiers
switch
14. This is used to mark the end of a complete C++ programming statement.
classes
Semicolon
source file
a.out
15. A variable declared outside any block or function is a ________ variable.
function overloading
const
global
like-type expression
16. Program components in C++ are called functions and ________.
operand value
setw
classes
main
17. Characters used to separate symbols or reserved words or identifiers and statements
char
whitespace
recursive function
prompt
18. A ________ program executes before the compiler's translation phase begins.
sorting
base
main
preprocessor
19. int namespace include using return examples of ___________
semicolon
reserve words
int values
associations
20. An expression that has operands with different data types
::
mixed expression
identifiers
main
21. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
whitespace
rand
beginning
22. The ________ qualifier is used to declare read-only variables.
base
const
Arithmetic Operators
ofstream
23. To explicitly indicate that a value is to be converted to another type
function scope
type casting (conversion)
t
NULL
24. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
<<
auto
new line
return
25. Type casting syntax
static_cast<char>(65)
Default memberwise assignment
classes
Sentinel
26. __________ can be used to assign an object of a class to another object of the same class.
static_cast<char>(65)
Default memberwise assignment
const datatype identifier = value
new line
27. C++ programs are normally typed into a computer using a(n) ________ program.
variable
source file
editor
pointer
28. Header file that contains commonly performed mathematical functions
&
cmath
pointer
recursive function
29. Allows the programmer to store a value in a variable
{ }
void
Arithmetic Operators
assignment statement
30. The process of placing the elements of an array in order is called ________ the array.
static
vectors
type casting (conversion)
sorting
31. 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.
binary operator
derived class
sorting
?
32. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
global
binary operator
const
friend
33. Initializers __________ must be used to initialize constant members of a class.
member
unary scope resolution operator (::)
recursive function
cin.get(ch)
34. When a value of one data type is implicitly (automatically) changed to another data type
strcmp()
type coercion
prompt
Default memberwise assignment
35. The __________ operator reclaims memory previously allocated by new.
static_cast<char>(65)
data type
delete
floating-point
36. The ________ enables access to a global variable with the same name as a variable in the current scope.
void
#include <headerfilename>
showpoint
unary scope resolution operator (::)
37. 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
38. Words that are used for special purposes in a program
fixed
reserved words
object-oriented analysis and design (OOAD)
comments
39. The stream insertion operator
preprocessor
strcmp()
Unified Modeling Language(UML)
<<
40. These are data items whose values do not change while the program is running
Literals
definition
friend
public
41. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
global
object file
&
42. 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.
unary scope resolution operator (::)
cout
loader
inheritance
43. The address-of operator. it is used to assign pointers and to print the address of variables.
&
char
base class
setw
44. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
private
variable
preprocessor
recursive
45. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
new line
friend
reserve words
function prototype
46. Symbol that denotes an action to be performed
delete
private
t
operator
47. newline
inheritance
<<
special symbols
n
48. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
/n
&
function call
49. Classes can have relationships with other classes. These relationships are called ________.
void
left
associations
if...else
50. The three values that can be used to initialize a pointer are 0 - __________ and an address.
<<
reserved words
NULL
escape sequences