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. The symbol for the binary scope resolution operator
cout
::
sorting
function parameters
2. In inheritance the ____________ is the class the receives the inherited members.
showpoint
function scope
heap
derived class
3. Compares two strings and returns 0 if they are equal.
special symbols
static
strcmp()
data type
4. An expression that has operands with different data types
return
const
mixed expression
Counter-controlled or definite
5. The storage-class specifiers are mutable - auto - ________ - extern and static.
constant variable
register
#include directive
two-dimensional
6. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
virtual functions
unary operator
named constant
binary operator
7. 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.
named constant
constant variable
sorting
inheritance
8. Function ________ is used to produce random numbers.
if
comments
rand
initialized
9. A ________ program executes before the compiler's translation phase begins.
preprocessor
data type
binary operator
template
10. Executable version of program
escape sequences
n
friend
object file
11. Two slash marks ( // ) indicate __________ of a comment
template
void
beginning
comments
12. A __________ data member represents class-wide information.
initialized
static
function prototype
object file
13. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
char
int values
//
void
14. Class members specified as _________ are accessible anywhere an object of the class is in scope.
private
public
comments
linker
15. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
derived class
register
before
16. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
type
function overloading
constant variable
Preprocessor
17. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
variable
two-dimensional
fixed
classes
18. The process of placing the elements of an array in order is called ________ the array.
derived class
cin.get(ch)
sorting
binary operator
19. = & | are examples of ____________.
arithmetic expression
special symbols
recursive function
editor
20. This manipulator is used to establish a field width for the value immediately following it.
information hiding
break
cin.get(ch)
setw
21. The sign you use for references
member
&
Preprocessor
static_cast<char>(65)
22. Preprocessor directive syntax
operator overloading
#include <headerfilename>
auto
sorting
23. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
vectors
attributes
selection
24. A type of pointer that can point at objects of any data type.
fstream
void pointer
>>
vectors
25. The process of determining if an array contains a particular key value is called _________ the array.
selection
searching
type coercion
assignment statement
26. A __________ should be used to declare the size of an array because it makes the program more scalable.
non-static
constant variable
srand
whitespace
27. For every opening brace in a C++ program there must be a ______________.
switch
Closing brace
opened
reserved words
28. The stream extraction operator
prompt
semicolon
>>
Unified Modeling Language(UML)
29. To allow file access in a program you must #include this header file.
recursive function
setw
fstream
Semicolon
30. 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.
non-static
#include <headerfilename>
/n
object-oriented analysis and design (OOAD)
31. A memory location with a name and data type - its content may be changed during program execution
Default memberwise assignment
reserve words
variable
endl (same as 'n')
32. int namespace include using return examples of ___________
switch
n
reserve words
special symbols
33. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
globals
source file
overloading
34. 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
address
operand value
object-oriented analysis and design (OOAD)
base
35. This is used to mark the end of a complete C++ programming statement.
#include directive
Semicolon
allocating memory
loader
36. Sets floating-point values to a fixed decimal format
public
main
switch
fixed
37. Forces the computer to display decimal point and trailing zeroes
showpoint
break
globals
information hiding
38. A variable that holds the address of another variable.
fstream
function scope
local variable
pointer
39. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
dot (.)
Literals
this
main
40. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
attributes
constant variable
public
41. The ________ of an identifier is the portion of the program in which the identifier can be used.
srand
classes
scope
const datatype identifier = value
42. 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
43. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
a.out
register
variable
strcpy()
44. Used to qualify hidden names so that they can be used.
searching
scope resolution operator
static
variables
45. Names of things that are used in a program - can apply to variables & constants and functions
endl (same as 'n')
identifiers
strlen()
/n
46. The modulus operator (%) can be used only with __________.
integer operands
classes
% modulus
inline functions
47. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
if...else
#include <headerfilename>
integer operands
48. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
setw
Literals
overloading
cin >> variable
49. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
reserve words
Sentinel
base
linker
50. Every C++ statement ends with a(n) _________.
function prototype
Counter-controlled or definite
main
semicolon