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. Used for dynamically allocated variables
srand
heap
if...else
type casting (conversion)
2. Executable version of program
register
identifiers
object file
scope resolution operator
3. This manipulator causes the field to be left-justified with padding spaces printed to the right.
loader
heap
left
default constructor
4. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
new line
delete
Stack overflow
globals
5. A variable declared outside any block or function is a ________ variable.
non-static
derived class
cin.get(ch)
global
6. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
source file
//
selection
showpoint
7. The sign you use for references
before
this
&
>>
8. For every opening brace in a C++ program there must be a ______________.
n
function parameters
Closing brace
assignment statement
9. Operator with two operands
const datatype identifier = value
binary operator
t
srand
10. 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
strlen()
named constant
const datatype identifier = value
base
11. 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
object file
assignment
static
12. These are data items whose values do not change while the program is running
#include directive
showpoint
Literals
if...else
13. A program that finds and attaches to your program the indicated libraries for compilation
stack
token
preprocessor
loader
14. newline
n
named constant
type casting (conversion)
arithmetic expression
15. The process of determining if an array contains a particular key value is called _________ the array.
information hiding
function scope
syntax
searching
16. The process of placing the elements of an array in order is called ________ the array.
>>
sorting
auto
constant variable
17. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
globals
cin >> variable
comments
function scope
18. A member function should be declared static if it does not access __________ class members.
non-static
vectors
classes
function prototype
19. Creates a copy of a string.
object file
before
strcpy()
selection
20. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
Semicolon
return
delete
operator overloading
21. 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.
strlen()
continue
type casting (conversion)
classes
22. Type casting syntax
&
semantics
operator
static_cast<char>(65)
23. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
classes
allocating memory
preprocessor
if...else
24. An expression that has operands with different data types
mixed expression
default constructor
const datatype identifier = value
reserved words
25. An array that uses two subscripts is referred to as a(n) _________ array.
function overloading
two-dimensional
address
setw
26. Program components in C++ are called functions and ________.
type
searching
0
classes
27. 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
semicolon
srand
derived class
28. Syntax for named constant declaration
continue
global
fixed
const datatype identifier = value
29. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
named constant
object file
information hiding
friend
30. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
polymorphism
void
{ }
31. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
<<
cin
//
recursive
32. Function ________ is used to set the random number seed to randomize a program.
linker
srand
classes
object file
33. A filestream variable that represents the default output device
assignment statement
#include <headerfilename>
stack
cout
34. 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
35. This manipulator is used to establish a field width for the value immediately following it.
floating-point
setw
<<
template
36. directive A statement that starts with a # is called a ____________.
arithmetic expression
rand
Preprocessor
ofstream
37. 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.
loader
0
if
dot (.)
38. When a value of one data type is implicitly (automatically) changed to another data type
sorting
type coercion
function scope
const
39. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
variables
?
searching
40. A constant object must be __________; it cannot be modified after it is created.
Stack overflow
pointer
recursive function
initialized
41. 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.
*
editor
assignment statement
static
42. A filestream variable that represents the default input source
stack
main
char
cin
43. Sets floating-point values to a fixed decimal format
recursive function
source file
fixed
pointer
44. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
allocating memory
operator overloading
loader
prompt
45. Classes can have relationships with other classes. These relationships are called ________.
whitespace
delete
associations
function overloading
46. __________ can be used to assign an object of a class to another object of the same class.
like-type expression
Default memberwise assignment
srand
::
47. A function that can be used to read character data including whitespace
preprocessor
Arithmetic Operators
srand
cin.get(ch)
48. An expression in which all operands have the same data type - result will have the same data type as operands
char
like-type expression
type coercion
member
49. int namespace include using return examples of ___________
a.out
reserve words
function scope
editor
50. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
/n
overloading
type
//