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 three values that can be used to initialize a pointer are 0 - __________ and an address.
void
&
0
NULL
2. You must have a ___________ for every variable you intend to use in a program
comments
Semicolon
definition
t
3. An expression in which all operands have the same data type - result will have the same data type as operands
binary operator
like-type expression
integer operands
function prototype
4. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
global
integer operands
{ }
5. A member function should be declared static if it does not access __________ class members.
non-static
comments
getline
&
6. A sequence of operands and operators that describe a calculation to be performed
::
arithmetic expression
t
derived class
7. 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
if...else
base
/n
Arithmetic Operators
8. * / % + -
special symbols
scope
Arithmetic Operators
Unified Modeling Language(UML)
9. Symbol that denotes an action to be performed
attributes
<<
operator
pointer
10. Two slash marks ( // ) indicate __________ of a comment
preprocessor
void pointer
beginning
inheritance
11. The number used to refer to a particular element of an array is called its ________.
this
static_cast<char>(65)
subscript (or index)
fixed
12. Naming convention for C++ programs
.cpp
constant variable
local variable
pointer
13. The ________ program combines the output of the compiler with various library functions to produce an executable image.
object-oriented analysis and design (OOAD)
&
linker
inline functions
14. A __________ should be used to declare the size of an array because it makes the program more scalable.
associations
{ }
constant variable
register
15. A program that finds and attaches to your program the indicated libraries for compilation
named constant
fstream
preprocessor
two-dimensional
16. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
rand
scope resolution operator
::
17. A file must be ________ before data can be written to or read from it.
srand
opened
cin.get(ch)
continue
18. int namespace include using return examples of ___________
//
reserve words
operator
?
19. Operator with only one operand
assignment
base class
unary operator
0
20. 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 overloading
void
endl (same as 'n')
integer operands
21. Function ________ is used to produce random numbers.
scope
return
rand
void
22. The process of placing the elements of an array in order is called ________ the array.
data type
binary operator
sorting
Preprocessor
23. A function that calls itself
initialized
globals
recursive function
loader
24. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
default constructor
switch
definition
char
25. The sign you use for references
break
&
static_cast<char>(65)
pointer
26. A set of values together with a set of operations
function scope
/n
static
data type
27. A human readable file that contains C++ program
heap
source file
derived class
function call
28. tab
non-static
constant variable
t
return
29. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
friend
const
classes
virtual functions
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.
linker
new line
#include <headerfilename>
/n
31. Used to qualify hidden names so that they can be used.
source file
syntax
searching
scope resolution operator
32. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
setw
object file
void pointer
33. 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.
integer operands
virtual functions
case sensitive
attributes
34. Returns the length of a string excluding the null terminator.
member
scope resolution operator
register
strlen()
35. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
named constant
Stack overflow
pointer
loader
36. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
const
editor
semantics
attributes
37. A pointer is a variable that contains as its value the____________ of another variable.
source file
special symbols
if
address
38. A function that can be used to read character data including whitespace
.cpp
setw
cin.get(ch)
classes
39. Allows the programmer to store a value in a variable
semicolon
assignment statement
unary operator
#include
40. 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
41. Initializers __________ must be used to initialize constant members of a class.
#include directive
preprocessor
member
comments
42. An expression that has operands with different data types
mixed expression
reserved words
recursive
selection
43. A constant object must be __________; it cannot be modified after it is created.
linker
initialized
srand
return
44. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
continue
Counter-controlled or definite
return
escape sequences
45. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
information hiding
base
opened
46. A filestream variable that represents the default output device
cout
NULL
% modulus
switch
47. Lists and tables of values can be stored in arrays or __________.
void
floating-point
operator
vectors
48. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
&
whitespace
operand value
if...else
49. In inheritance the ____________ is the class that supplies the inherited members.
heap
base class
public
scope resolution operator
50. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
0
static
getline
arithmetic expression