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. 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
base
const datatype identifier = value
/n
associations
2. A filestream variable that represents the default output device
address
Arithmetic Operators
cin.get(ch)
cout
3. Initializers __________ must be used to initialize constant members of a class.
member
this
fixed
char
4. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
inheritance
global
floating-point
5. The ________ program combines the output of the compiler with various library functions to produce an executable image.
recursive function
showpoint
recursive
linker
6. To write data to a file you define an object of which one of the following
attributes
static_cast<char>(65)
ofstream
static
7. Most calculations are normally performed by ______ statements.
base
assignment
n
strcpy()
8. 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
if
cmath
linker
9. An expression in which all operands have the same data type - result will have the same data type as operands
continue
like-type expression
register
return
10. You must have a ___________ for every variable you intend to use in a program
Preprocessor
scope resolution operator
definition
&
11. A variable declared outside any block or function is a ________ variable.
before
stack
global
void
12. A set of values together with a set of operations
return
data type
srand
case sensitive
13. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
static_cast<char>(65)
//
local variable
public
14. A human readable file that contains C++ program
source file
case sensitive
object-oriented analysis and design (OOAD)
function prototype
15. Operator with two operands
binary operator
ofstream
named constant
definition
16. To explicitly indicate that a value is to be converted to another type
polymorphism
type casting (conversion)
::
pointer
17. A program that finds and attaches to your program the indicated libraries for compilation
setw
preprocessor
<<
mixed expression
18. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
Stack overflow
function overloading
cout
int values
19. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
variable
int values
vectors
20. The symbol for the binary scope resolution operator
information hiding
default constructor
::
private
21. A __________ should be used to declare the size of an array because it makes the program more scalable.
variable
cin >> variable
constant variable
associations
22. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
new line
n
Stack overflow
polymorphism
23. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
.cpp
cout
reserved words
auto
24. Naming convention for C++ programs
Counter-controlled or definite
void pointer
.cpp
linker
25. You can declare default values for a function in the ____________________.
Default memberwise assignment
function parameters
NULL
dot (.)
26. This manipulator is used to establish a field width for the value immediately following it.
associations
setw
editor
cin.get(ch)
27. Every C++ statement ends with a(n) _________.
semicolon
attributes
{ }
const
28. Member objects are constructed __________ their enclosing class object.
*
before
cout
endl (same as 'n')
29. Every C++ program begins execution at the function _________.
main
.cpp
variables
heap
30. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
dot (.)
showpoint
auto
31. 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
selection
void
allocating memory
32. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
initialized
sorting
pointer
.cpp
33. Function ________ is used to produce random numbers.
data type
rand
variables
classes
34. Used for dynamically allocated variables
attributes
n
heap
if
35. Executable version of program
object file
special symbols
% modulus
local variable
36. The elements of an array are related by the fact that they have the same name and ___________.
virtual functions
type
special symbols
dot (.)
37. The address-of operator. it is used to assign pointers and to print the address of variables.
global
type casting (conversion)
&
delete
38. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
rand
static_cast<char>(65)
member
39. The sign you use for pointers
*
showpoint
const
opened
40. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
/n
function scope
like-type expression
selection
41. A C++ statement that makes a decision is ______.
globals
derived class
function parameters
if
42. Characters used to separate symbols or reserved words or identifiers and statements
semantics
whitespace
syntax
named constant
43. When a value of one data type is implicitly (automatically) changed to another data type
arithmetic expression
type coercion
register
searching
44. The process of analyzing and designing a system from an object-oriented point of view is called ________.
0
object-oriented analysis and design (OOAD)
friend
void
45. Sets floating-point values to a fixed decimal format
cin.get(ch)
variable
globals
fixed
46. Header file that contains commonly performed mathematical functions
cmath
&
non-static
subscript (or index)
47. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
semicolon
strcmp()
Preprocessor
48. Associate an identifier with a memory location
allocating memory
Sentinel
&
sorting
49. Classes can have relationships with other classes. These relationships are called ________.
setw
Semicolon
operator overloading
associations
50. An expression that has operands with different data types
mixed expression
new line
address
syntax