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. To allow file access in a program you must #include this header file.
variables
fstream
dot (.)
#include directive
2. Program components in C++ are called functions and ________.
classes
public
beginning
whitespace
3. In inheritance the ____________ is the class the receives the inherited members.
preprocessor
reserved words
derived class
{ }
4. The _________ begins the body of every function and the _________ ends the body of every function.
unary scope resolution operator (::)
{ }
void
.cpp
5. Characters used to separate symbols or reserved words or identifiers and statements
comments
whitespace
base
sorting
6. Allows the programmer to store a value in a variable
assignment statement
editor
/n
public
7. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
Literals
prompt
auto
allocating memory
8. 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
operator overloading
Stack overflow
ofstream
9. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
?
Preprocessor
char
editor
10. 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.
public
continue
constant variable
Semicolon
11. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
selection
named constant
object file
12. A __________ data member represents class-wide information.
scope resolution operator
before
0
static
13. A __________ should be used to declare the size of an array because it makes the program more scalable.
<<
operator overloading
constant variable
char
14. A pointer is a variable that contains as its value the____________ of another variable.
address
recursive
named constant
Semicolon
15. Creates a copy of a string.
operand value
preprocessor
continue
strcpy()
16. Forces the computer to display decimal point and trailing zeroes
recursive function
searching
showpoint
Counter-controlled or definite
17. 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
getline
before
a.out
18. The three values that can be used to initialize a pointer are 0 - __________ and an address.
prompt
return
NULL
function overloading
19. This is used to mark the end of a complete C++ programming statement.
ofstream
Semicolon
mixed expression
initialized
20. Two slash marks ( // ) indicate __________ of a comment
>>
function parameters
{ }
beginning
21. The ________ statement in a called function passes the value of an expression back to the calling function.
editor
return
selection
Arithmetic Operators
22. A function that can be used to read character data including whitespace
variables
unary operator
pointer
cin.get(ch)
23. The address-of operator. it is used to assign pointers and to print the address of variables.
assignment statement
semicolon
&
Sentinel
24. Member objects are constructed __________ their enclosing class object.
member
Arithmetic Operators
void
before
25. Returns the length of a string excluding the null terminator.
data type
strlen()
void pointer
preprocessor
26. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
t
this
#include <headerfilename>
virtual functions
27. You can declare default values for a function in the ____________________.
operand value
function parameters
function scope
constant variable
28. Syntax for named constant declaration
assignment
const datatype identifier = value
beginning
non-static
29. Use 2 characters to represent one
polymorphism
friend
<<
escape sequences
30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
object-oriented analysis and design (OOAD)
semantics
vectors
assignment statement
31. data types that refer to numbers with decimals
operand value
mixed expression
floating-point
definition
32. The _____ causes the contents of another file to be inserted into a program.
variables
#include directive
if
static
33. The number used to refer to a particular element of an array is called its ________.
const
function overloading
subscript (or index)
object-oriented analysis and design (OOAD)
34. A variable that holds the address of another variable.
overloading
fixed
unary operator
pointer
35. A function that calls itself
preprocessor
member
<<
recursive function
36. Initializers __________ must be used to initialize constant members of a class.
member
>>
cin.get(ch)
Stack overflow
37. The stream insertion operator
{ }
delete
srand
<<
38. Default name of executable file
#include
escape sequences
object file
a.out
39. A function is invoked with a ________.
constant variable
function call
mixed expression
static_cast<char>(65)
40. The stream extraction operator
.cpp
>>
data type
main
41. The sign you use for references
Literals
prompt
selection
&
42. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
void
syntax
strcpy()
43. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
loader
friend
Closing brace
?
44. A set of values together with a set of operations
information hiding
Counter-controlled or definite
data type
public
45. A C++ statement that makes a decision is ______.
assignment
setw
function call
if
46. A file must be ________ before data can be written to or read from it.
before
access specifier
::
opened
47. The modulus operator (%) can be used only with __________.
cin
register
integer operands
two-dimensional
48. A type of pointer that can point at objects of any data type.
void pointer
/n
% modulus
NULL
49. The symbol for the binary scope resolution operator
setw
like-type expression
attributes
::
50. 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