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. tab
t
function prototype
endl (same as 'n')
integer operands
2. Function ________ is used to produce random numbers.
<<
Unified Modeling Language(UML)
rand
type coercion
3. Compares two strings and returns 0 if they are equal.
case sensitive
void
inline functions
strcmp()
4. The number used to refer to a particular element of an array is called its ________.
switch
subscript (or index)
associations
non-static
5. Identifier or expression that is part of the calculation to be performed
non-static
static_cast<char>(65)
selection
operand value
6. Class members specified as _________ are accessible anywhere an object of the class is in scope.
public
register
base
setw
7. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
special symbols
void
scope resolution operator
srand
8. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
>>
.cpp
type coercion
9. Used for dynamically allocated variables
local variable
attributes
heap
Arithmetic Operators
10. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
function scope
template
register
11. __________ can be used to assign an object of a class to another object of the same class.
whitespace
pointer
<<
Default memberwise assignment
12. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
char
escape sequences
selection
main
13. Two slash marks ( // ) indicate __________ of a comment
information hiding
beginning
dot (.)
this
14. Type casting syntax
static_cast<char>(65)
function call
function scope
preprocessor
15. To write data to a file you define an object of which one of the following
definition
two-dimensional
subscript (or index)
ofstream
16. 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
17. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
setw
function prototype
const
18. You can declare default values for a function in the ____________________.
{ }
function parameters
*
fstream
19. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
unary scope resolution operator (::)
Sentinel
#include
cin >> variable
20. For every opening brace in a C++ program there must be a ______________.
Closing brace
member
classes
cin >> variable
21. The ________ statement in a called function passes the value of an expression back to the calling function.
before
cout
void
return
22. Operator with only one operand
stack
register
selection
unary operator
23. The ________ enables access to a global variable with the same name as a variable in the current scope.
heap
ofstream
token
unary scope resolution operator (::)
24. A sequence of operands and operators that describe a calculation to be performed
globals
getline
cin >> variable
arithmetic expression
25. newline
variables
cin.get(ch)
editor
n
26. Every C++ program begins execution at the function _________.
public
operator overloading
continue
main
27. A C++ statement that makes a decision is ______.
new line
prompt
if
scope resolution operator
28. A filestream variable that represents the default output device
cout
linker
cmath
endl (same as 'n')
29. The size & shape & color and weight of an object are considered
reserve words
&
attributes
initialized
30. The __________ operator reclaims memory previously allocated by new.
#include directive
public
preprocessor
delete
31. A set of values together with a set of operations
data type
classes
a.out
allocating memory
32. A member function should be declared static if it does not access __________ class members.
char
non-static
0
switch
33. If a member initializer is not provided for a member object of a class the object's __________ is called.
function scope
static
default constructor
associations
34. C++ programs are normally typed into a computer using a(n) ________ program.
dot (.)
editor
Semicolon
function parameters
35. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
ofstream
operator overloading
srand
function scope
36. The stream extraction operator
inheritance
>>
function parameters
function call
37. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
fstream
Stack overflow
before
NULL
38. Used to qualify hidden names so that they can be used.
unary scope resolution operator (::)
function prototype
scope resolution operator
cin
39. To allow file access in a program you must #include this header file.
case sensitive
fstream
variable
prompt
40. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
reserve words
function call
type
41. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
>>
const
overloading
static_cast<char>(65)
42. A ________ program executes before the compiler's translation phase begins.
static_cast<char>(65)
preprocessor
continue
reserve words
43. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
linker
const
function overloading
//
44. A human readable file that contains C++ program
strlen()
0
NULL
source file
45. The _________ begins the body of every function and the _________ ends the body of every function.
information hiding
associations
{ }
endl (same as 'n')
46. A variable that holds the address of another variable.
inline functions
private
operand value
pointer
47. Repeating a set of instructions a specific number of times is called_________repetition.
strcpy()
Counter-controlled or definite
static
&
48. Syntax for named constant declaration
recursive function
floating-point
const datatype identifier = value
int values
49. A program that finds and attaches to your program the indicated libraries for compilation
opened
preprocessor
object file
stack
50. Message displayed to the screen asking user for input; generated with an output statement
if
searching
polymorphism
prompt