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. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
classes
Sentinel
operator
2. A filestream variable that represents the default input source
function prototype
cin
classes
cout
3. The modulus operator (%) can be used only with __________.
integer operands
definition
classes
comments
4. A pointer is a variable that contains as its value the____________ of another variable.
selection
address
scope
attributes
5. int namespace include using return examples of ___________
static_cast<char>(65)
non-static
semicolon
reserve words
6. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
if
% modulus
#include
7. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
scope
integer operands
const
8. For every opening brace in a C++ program there must be a ______________.
Closing brace
member
initialized
base
9. The __________ operator reclaims memory previously allocated by new.
polymorphism
vectors
delete
semicolon
10. Compares two strings and returns 0 if they are equal.
register
&
two-dimensional
strcmp()
11. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
initialized
break
vectors
static
12. A function is invoked with a ________.
t
function call
int values
>>
13. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
showpoint
Stack overflow
static
?
14. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
&
pointer
function parameters
15. These are data items whose values do not change while the program is running
{ }
classes
Literals
pointer
16. The address-of operator. it is used to assign pointers and to print the address of variables.
case sensitive
cin.get(ch)
&
whitespace
17. 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
18. The ________ program transfers the executable image of a C++ program from disk to memory.
scope resolution operator
endl (same as 'n')
loader
function prototype
19. C++ programs are normally typed into a computer using a(n) ________ program.
return
editor
syntax
Default memberwise assignment
20. 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.
dot (.)
linker
Preprocessor
reserved words
21. Operator with two operands
special symbols
#include
binary operator
Default memberwise assignment
22. Header file that contains commonly performed mathematical functions
fixed
cmath
operator
dot (.)
23. Words that are used for special purposes in a program
escape sequences
void pointer
reserved words
cin >> variable
24. A C++ statement that makes a decision is ______.
if
preprocessor
return
cin.get(ch)
25. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
attributes
% modulus
Counter-controlled or definite
switch
26. In inheritance the ____________ is the class that supplies the inherited members.
public
loader
base class
NULL
27. Function ________ is used to set the random number seed to randomize a program.
srand
syntax
semicolon
strcmp()
28. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
identifiers
named constant
type
29. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
operator overloading
pointer
preprocessor
named constant
30. newline
attributes
semicolon
/n
n
31. All C++ Variables are_________.
type coercion
void
case sensitive
0
32. 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.
function call
if
Sentinel
Closing brace
33. The process of analyzing and designing a system from an object-oriented point of view is called ________.
unary scope resolution operator (::)
binary operator
Closing brace
object-oriented analysis and design (OOAD)
34. 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.
continue
semicolon
<<
base class
35. The only integer that can be assigned directly to a pointer is_____________.
operator
switch
unary operator
0
36. You can declare default values for a function in the ____________________.
identifiers
like-type expression
function parameters
reserved words
37. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
reserve words
identifiers
object-oriented analysis and design (OOAD)
38. A function ________ enables a single function to be defined to perform a task on many different data types.
template
pointer
special symbols
char
39. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
#include <headerfilename>
selection
#include
40. Function ________ is used to produce random numbers.
subscript (or index)
rand
globals
scope resolution operator
41. In inheritance the ____________ is the class the receives the inherited members.
derived class
Stack overflow
cin >> variable
const datatype identifier = value
42. A ________ program executes before the compiler's translation phase begins.
reserved words
Sentinel
preprocessor
cin >> variable
43. 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.
static
#include directive
/n
void
44. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
integer operands
Literals
ofstream
function overloading
45. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
setw
strlen()
break
base class
46. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
friend
access specifier
*
47. 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.
preprocessor
cmath
/n
>>
48. The _____ causes the contents of another file to be inserted into a program.
strcmp()
#include directive
cmath
#include <headerfilename>
49. A variable declared outside any block or function is a ________ variable.
preprocessor
global
member
>>
50. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
Preprocessor
friend
base class
cin >> variable