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. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
type coercion
function overloading
left
continue
2. Forces the computer to display decimal point and trailing zeroes
sorting
cin.get(ch)
void
showpoint
3. tab
virtual functions
Unified Modeling Language(UML)
whitespace
t
4. All C++ Variables are_________.
polymorphism
virtual functions
delete
case sensitive
5. You must have a ___________ for every variable you intend to use in a program
case sensitive
definition
semicolon
operator
6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
left
overloading
function scope
% modulus
7. A set of values together with a set of operations
data type
cin.get(ch)
inline functions
globals
8. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
stack
constant variable
*
9. Header file that contains commonly performed mathematical functions
% modulus
strcpy()
cmath
identifiers
10. An expression in which all operands have the same data type - result will have the same data type as operands
like-type expression
classes
static
subscript (or index)
11. * / % + -
Arithmetic Operators
>>
void pointer
syntax
12. Creates a copy of a string.
strcpy()
dot (.)
integer operands
classes
13. A variable declared outside any block or function is a ________ variable.
global
mixed expression
inheritance
::
14. Used for function calls and local variables
stack
if...else
initialized
/n
15. Whole numbers - no decimals and no commas included
int values
named constant
#include directive
.cpp
16. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
if...else
const
break
17. 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
::
cin
base
unary scope resolution operator (::)
18. Operator with only one operand
unary operator
comments
>>
const datatype identifier = value
19. A function that calls itself
unary operator
//
recursive function
base
20. This is used to mark the end of a complete C++ programming statement.
//
derived class
reserve words
Semicolon
21. Two slash marks ( // ) indicate __________ of a comment
fstream
scope resolution operator
&
beginning
22. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
function scope
friend
sorting
token
23. Naming convention for C++ programs
overloading
.cpp
floating-point
void pointer
24. A member function should be declared static if it does not access __________ class members.
variables
fstream
non-static
access specifier
25. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
>>
searching
cin.get(ch)
return
26. A program that finds and attaches to your program the indicated libraries for compilation
if
preprocessor
strcmp()
assignment
27. 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
28. A constant object must be __________; it cannot be modified after it is created.
two-dimensional
cin
associations
initialized
29. The ________ statement in a called function passes the value of an expression back to the calling function.
overloading
return
fstream
named constant
30. Returns the length of a string excluding the null terminator.
pointer
register
strlen()
fixed
31. The ________ qualifier is used to declare read-only variables.
function call
allocating memory
% modulus
const
32. This manipulator causes the field to be left-justified with padding spaces printed to the right.
NULL
{ }
left
const
33. directive A statement that starts with a # is called a ____________.
Closing brace
recursive function
Preprocessor
default constructor
34. Sets floating-point values to a fixed decimal format
pointer
variable
fixed
arithmetic expression
35. A function ________ enables a single function to be defined to perform a task on many different data types.
template
semicolon
delete
strlen()
36. Repeating a set of instructions a specific number of times is called_________repetition.
void pointer
Counter-controlled or definite
assignment statement
friend
37. 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.
/n
cout
constant variable
base class
38. The stream extraction operator
associations
function scope
inline functions
>>
39. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
cin
data type
*
recursive
40. A human readable file that contains C++ program
assignment statement
left
source file
case sensitive
41. These are data items whose values do not change while the program is running
pointer
Literals
local variable
ofstream
42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
0
function scope
cin >> variable
&
43. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
preprocessor
token
escape sequences
address
44. Type casting syntax
preprocessor
Unified Modeling Language(UML)
editor
static_cast<char>(65)
45. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Semicolon
reserved words
named constant
function prototype
46. A file must be ________ before data can be written to or read from it.
opened
&
/n
prompt
47. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
preprocessor
whitespace
polymorphism
48. 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.
Sentinel
unary scope resolution operator (::)
Default memberwise assignment
reserve words
49. A type of pointer that can point at objects of any data type.
classes
variables
void pointer
static
50. Used to qualify hidden names so that they can be used.
static
scope resolution operator
reserved words
operator overloading