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 four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
non-static
unary scope resolution operator (::)
globals
vectors
2. Forces the computer to display decimal point and trailing zeroes
constant variable
address
arithmetic expression
showpoint
3. A member function should be declared static if it does not access __________ class members.
non-static
*
cin >> variable
assignment
4. In inheritance the ____________ is the class that supplies the inherited members.
main
#include
type
base class
5. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
integer operands
a.out
function scope
6. The __________ operator reclaims memory previously allocated by new.
delete
private
friend
{ }
7. 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.
preprocessor
continue
reserve words
member
8. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
void pointer
opened
Unified Modeling Language(UML)
if...else
9. Nonexecutable statements that are included in a program to provide information about what the program does etc.
endl (same as 'n')
int values
comments
.cpp
10. A pointer is a variable that contains as its value the____________ of another variable.
char
Arithmetic Operators
Default memberwise assignment
address
11. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
searching
function parameters
reserved words
getline
12. Function ________ is used to produce random numbers.
Literals
rand
void
token
13. The sign you use for pointers
preprocessor
public
syntax
*
14. A ________ program executes before the compiler's translation phase begins.
preprocessor
private
strcpy()
Sentinel
15. The process of determining if an array contains a particular key value is called _________ the array.
#include
default constructor
return
searching
16. A program that finds and attaches to your program the indicated libraries for compilation
variables
if...else
base
preprocessor
17. data types that refer to numbers with decimals
pointer
operand value
floating-point
non-static
18. The ________ qualifier is used to declare read-only variables.
const
polymorphism
template
function overloading
19. 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.
prompt
?
switch
mixed expression
20. A filestream variable that represents the default input source
binary operator
allocating memory
>>
cin
21. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
floating-point
#include
named constant
22. A variable declared outside any block or function is a ________ variable.
semantics
case sensitive
function call
global
23. * / % + -
Arithmetic Operators
public
reserved words
stack
24. Used for function calls and local variables
stack
static_cast<char>(65)
&
vectors
25. The _________ begins the body of every function and the _________ ends the body of every function.
type
member
initialized
{ }
26. Naming convention for C++ programs
.cpp
function call
continue
>>
27. Use 2 characters to represent one
function scope
*
escape sequences
source file
28. Creates a copy of a string.
strcpy()
continue
linker
virtual functions
29. 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
30. 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.
heap
/n
::
overloading
31. Preprocessor directive syntax
#include <headerfilename>
stack
rand
attributes
32. Most calculations are normally performed by ______ statements.
assignment
variables
like-type expression
base
33. Compares two strings and returns 0 if they are equal.
strcmp()
.cpp
subscript (or index)
new line
34. Member objects are constructed __________ their enclosing class object.
register
reserved words
comments
before
35. newline
binary operator
n
classes
void
36. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
virtual functions
function overloading
integer operands
void
37. An array that uses two subscripts is referred to as a(n) _________ array.
{ }
two-dimensional
return
Closing brace
38. The sign you use for references
assignment
&
srand
semantics
39. Names of things that are used in a program - can apply to variables & constants and functions
n
identifiers
type
&
40. Lists and tables of values can be stored in arrays or __________.
Closing brace
vectors
sorting
non-static
41. This manipulator causes the field to be left-justified with padding spaces printed to the right.
function overloading
object file
unary scope resolution operator (::)
left
42. The only integer that can be assigned directly to a pointer is_____________.
stack
getline
0
member
43. Repeating a set of instructions a specific number of times is called_________repetition.
static_cast<char>(65)
Counter-controlled or definite
reserve words
stack
44. This manipulator is used to establish a field width for the value immediately following it.
char
setw
this
Counter-controlled or definite
45. Symbol that denotes an action to be performed
void pointer
operator
pointer
char
46. A function ________ enables a single function to be defined to perform a task on many different data types.
template
function prototype
::
loader
47. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
allocating memory
selection
void pointer
floating-point
48. Whole numbers - no decimals and no commas included
const datatype identifier = value
int values
Semicolon
subscript (or index)
49. 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.
constant variable
Sentinel
inheritance
data type
50. A function that calls itself
template
void
recursive function
return