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. You can declare default values for a function in the ____________________.
Arithmetic Operators
type casting (conversion)
srand
function parameters
2. 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
const
Unified Modeling Language(UML)
char
3. Syntax for named constant declaration
cin
&
const datatype identifier = value
arithmetic expression
4. The elements of an array are related by the fact that they have the same name and ___________.
n
type
operand value
type coercion
5. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
break
virtual functions
{ }
6. An expression that has operands with different data types
assignment
static_cast<char>(65)
two-dimensional
mixed expression
7. A function ________ enables a single function to be defined to perform a task on many different data types.
cin.get(ch)
template
setw
variables
8. Characters used to separate symbols or reserved words or identifiers and statements
reserved words
whitespace
const
preprocessor
9. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
non-static
dot (.)
Unified Modeling Language(UML)
?
10. Keyword public is a(n) _________
.cpp
register
strcmp()
access specifier
11. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
>>
globals
function scope
12. The modulus operator (%) can be used only with __________.
srand
integer operands
void
prompt
13. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
showpoint
NULL
const datatype identifier = value
14. Words that are used for special purposes in a program
reserved words
&
Sentinel
assignment statement
15. A sequence of operands and operators that describe a calculation to be performed
if
arithmetic expression
return
endl (same as 'n')
16. This is used to mark the end of a complete C++ programming statement.
integer operands
Semicolon
//
scope
17. Sets floating-point values to a fixed decimal format
overloading
const
static
fixed
18. Symbol that denotes an action to be performed
semicolon
cin >> variable
operator
variables
19. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
local variable
::
cin >> variable
a.out
20. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
recursive function
Unified Modeling Language(UML)
opened
address
21. A C++ statement that makes a decision is ______.
template
cin >> variable
if
globals
22. You must have a ___________ for every variable you intend to use in a program
assignment
//
definition
scope
23. A type of pointer that can point at objects of any data type.
member
void
void pointer
comments
24. directive A statement that starts with a # is called a ____________.
Counter-controlled or definite
Preprocessor
Arithmetic Operators
sorting
25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
const
*
reserved words
26. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
private
void
globals
27. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
void
reserved words
&
28. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
classes
identifiers
getline
variables
29. A program that finds and attaches to your program the indicated libraries for compilation
local variable
auto
preprocessor
<<
30. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
private
selection
token
attributes
31. Classes can have relationships with other classes. These relationships are called ________.
globals
static
NULL
associations
32. Nonexecutable statements that are included in a program to provide information about what the program does etc.
<<
comments
auto
NULL
33. 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
34. A function that can be used to read character data including whitespace
cin.get(ch)
type
strcpy()
stack
35. 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
comments
virtual functions
&
36. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
Semicolon
global
heap
37. The address-of operator. it is used to assign pointers and to print the address of variables.
<<
static
cmath
&
38. The __________ operator reclaims memory previously allocated by new.
delete
function overloading
searching
const datatype identifier = value
39. The process of determining if an array contains a particular key value is called _________ the array.
a.out
default constructor
inheritance
searching
40. The ________ statement in a called function passes the value of an expression back to the calling function.
int values
setw
linker
return
41. An expression in which all operands have the same data type - result will have the same data type as operands
source file
this
like-type expression
semicolon
42. Used to qualify hidden names so that they can be used.
classes
default constructor
void pointer
scope resolution operator
43. To allow file access in a program you must #include this header file.
escape sequences
preprocessor
fstream
preprocessor
44. newline
n
::
pointer
semantics
45. The ________ program transfers the executable image of a C++ program from disk to memory.
pointer
loader
assignment statement
setw
46. The _____ causes the contents of another file to be inserted into a program.
if...else
a.out
#include directive
Preprocessor
47. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
arithmetic expression
//
break
variable
48. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
mixed expression
register
searching
function parameters
49. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
main
#include
fstream
50. An array that uses two subscripts is referred to as a(n) _________ array.
auto
global
prompt
two-dimensional