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 __________ operator reclaims memory previously allocated by new.
reserve words
delete
operand value
&
2. A human readable file that contains C++ program
source file
auto
overloading
associations
3. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
void pointer
&
heap
break
4. The address-of operator. it is used to assign pointers and to print the address of variables.
showpoint
comments
globals
&
5. Most calculations are normally performed by ______ statements.
information hiding
void pointer
assignment
&
6. To write data to a file you define an object of which one of the following
ofstream
loader
strcmp()
Default memberwise assignment
7. Whole numbers - no decimals and no commas included
int values
% modulus
base class
preprocessor
8. = & | are examples of ____________.
new line
register
initialized
special symbols
9. 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.
*
information hiding
setw
sorting
10. A program that finds and attaches to your program the indicated libraries for compilation
Default memberwise assignment
preprocessor
loader
delete
11. A variable declared outside any block or function is a ________ variable.
::
global
function call
cin.get(ch)
12. In inheritance the ____________ is the class the receives the inherited members.
object-oriented analysis and design (OOAD)
?
address
derived class
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.
Unified Modeling Language(UML)
like-type expression
Literals
?
14. Two slash marks ( // ) indicate __________ of a comment
beginning
classes
&
Stack overflow
15. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
scope resolution operator
searching
recursive
function scope
16. This manipulator is used to establish a field width for the value immediately following it.
setw
strlen()
fstream
information hiding
17. To allow file access in a program you must #include this header file.
fstream
local variable
#include <headerfilename>
void pointer
18. The ________ enables access to a global variable with the same name as a variable in the current scope.
rand
unary scope resolution operator (::)
*
globals
19. Lists and tables of values can be stored in arrays or __________.
stack
showpoint
vectors
{ }
20. When a value of one data type is implicitly (automatically) changed to another data type
assignment statement
preprocessor
dot (.)
type coercion
21. The process of determining if an array contains a particular key value is called _________ the array.
initialized
searching
operator overloading
reserved words
22. Use 2 characters to represent one
Counter-controlled or definite
#include directive
object file
escape sequences
23. Words that are used for special purposes in a program
default constructor
reserved words
void pointer
overloading
24. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
overloading
private
register
inline functions
25. You must have a ___________ for every variable you intend to use in a program
arithmetic expression
vectors
special symbols
definition
26. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
type coercion
source file
classes
access specifier
27. A function that calls itself
recursive function
{ }
register
syntax
28. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
return
% modulus
overloading
Arithmetic Operators
29. 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.
*
/n
?
globals
30. The ________ statement in a called function passes the value of an expression back to the calling function.
return
operand value
cmath
constant variable
31. 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
register
before
semicolon
32. Function ________ is used to set the random number seed to randomize a program.
unary scope resolution operator (::)
srand
::
rand
33. Initializers __________ must be used to initialize constant members of a class.
return
void
member
escape sequences
34. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
vectors
variables
stack
35. 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
36. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
scope
named constant
//
Arithmetic Operators
37. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
/n
type coercion
getline
38. An array that uses two subscripts is referred to as a(n) _________ array.
{ }
type
two-dimensional
attributes
39. All ______ must be declared before they are used.
selection
non-static
cout
variables
40. 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.
#include <headerfilename>
associations
Preprocessor
Sentinel
41. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
//
break
getline
like-type expression
42. The ________ program combines the output of the compiler with various library functions to produce an executable image.
const
special symbols
linker
case sensitive
43. Executable version of program
definition
.cpp
object file
selection
44. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
endl (same as 'n')
char
if
45. A variable that holds the address of another variable.
pointer
/n
type coercion
like-type expression
46. 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.
//
*
cin >> variable
virtual functions
47. A type of pointer that can point at objects of any data type.
void pointer
semicolon
allocating memory
escape sequences
48. A file must be ________ before data can be written to or read from it.
strcpy()
opened
Semicolon
variables
49. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
classes
operator
friend
50. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
heap
&
new line
strcpy()