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.
operand value
NULL
Arithmetic Operators
fstream
2. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
n
break
stack
template
3. 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.
object file
object-oriented analysis and design (OOAD)
searching
virtual functions
4. Every C++ statement ends with a(n) _________.
semicolon
special symbols
function call
escape sequences
5. The process of analyzing and designing a system from an object-oriented point of view is called ________.
friend
object-oriented analysis and design (OOAD)
switch
getline
6. A type of pointer that can point at objects of any data type.
register
unary operator
int values
void pointer
7. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
friend
<<
break
8. These are data items whose values do not change while the program is running
private
static
const
Literals
9. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
classes
cin
void
searching
10. A program that finds and attaches to your program the indicated libraries for compilation
non-static
cin >> variable
inheritance
preprocessor
11. This manipulator causes the field to be left-justified with padding spaces printed to the right.
local variable
Literals
left
overloading
12. A C++ statement that makes a decision is ______.
if
operator
allocating memory
before
13. An expression in which all operands have the same data type - result will have the same data type as operands
cout
like-type expression
this
friend
14. Used for function calls and local variables
member
static
stack
integer operands
15. The _____ causes the contents of another file to be inserted into a program.
function overloading
#include directive
type coercion
inline functions
16. The ________ qualifier is used to declare read-only variables.
Preprocessor
object-oriented analysis and design (OOAD)
address
const
17. Keyword public is a(n) _________
access specifier
//
<<
Closing brace
18. 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
19. Message displayed to the screen asking user for input; generated with an output statement
prompt
pointer
pointer
char
20. This manipulator is used to establish a field width for the value immediately following it.
setw
new line
recursive
char
21. Class members specified as _________ are accessible anywhere an object of the class is in scope.
cmath
public
pointer
*
22. Two slash marks ( // ) indicate __________ of a comment
unary scope resolution operator (::)
beginning
fixed
allocating memory
23. The process of placing the elements of an array in order is called ________ the array.
public
&
sorting
cin
24. Syntax for named constant declaration
return
const datatype identifier = value
pointer
delete
25. The symbol for the binary scope resolution operator
fstream
if...else
reserve words
::
26. The size & shape & color and weight of an object are considered
attributes
static
opened
fixed
27. C++ programs are normally typed into a computer using a(n) ________ program.
searching
?
editor
void
28. Identifier or expression that is part of the calculation to be performed
Counter-controlled or definite
operand value
information hiding
#include
29. This is used to mark the end of a complete C++ programming statement.
Semicolon
NULL
const
inline functions
30. A memory location with a name and data type - its content may be changed during program execution
dot (.)
semicolon
variable
special symbols
31. To explicitly indicate that a value is to be converted to another type
srand
Semicolon
type casting (conversion)
function scope
32. 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.
void
#include directive
this
default constructor
33. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
object file
reserved words
token
strcpy()
34. Function ________ is used to set the random number seed to randomize a program.
associations
srand
integer operands
definition
35. A function ________ enables a single function to be defined to perform a task on many different data types.
return
Counter-controlled or definite
template
Literals
36. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
two-dimensional
associations
inline functions
comments
37. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
strcpy()
vectors
Unified Modeling Language(UML)
return
38. The number used to refer to a particular element of an array is called its ________.
n
subscript (or index)
void pointer
default constructor
39. The modulus operator (%) can be used only with __________.
type coercion
integer operands
NULL
t
40. 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.
auto
private
semicolon
/n
41. __________ can be used to assign an object of a class to another object of the same class.
Preprocessor
showpoint
function prototype
Default memberwise assignment
42. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
t
recursive
unary operator
&
43. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
{ }
base class
arithmetic expression
overloading
44. Whole numbers - no decimals and no commas included
initialized
object-oriented analysis and design (OOAD)
int values
semantics
45. Type casting syntax
static_cast<char>(65)
variable
srand
preprocessor
46. Characters used to separate symbols or reserved words or identifiers and statements
linker
whitespace
int values
void
47. Naming convention for C++ programs
pointer
.cpp
linker
cmath
48. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
Literals
operator overloading
comments
type casting (conversion)
49. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
char
recursive
binary operator
50. In inheritance the ____________ is the class the receives the inherited members.
#include <headerfilename>
classes
derived class
semicolon