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. 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
2. An operator that can only be used with int values. result will always be an int.
void
fixed
recursive function
% modulus
3. Preprocessor directive syntax
#include <headerfilename>
reserve words
case sensitive
private
4. Operator with only one operand
global
base class
unary operator
ofstream
5. A pointer is a variable that contains as its value the____________ of another variable.
stack
address
global
selection
6. The process of placing the elements of an array in order is called ________ the array.
Counter-controlled or definite
sorting
opened
void
7. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
two-dimensional
assignment
rand
selection
8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
loader
overloading
data type
base
9. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
new line
type casting (conversion)
if
register
10. Forces the computer to display decimal point and trailing zeroes
function prototype
base class
>>
showpoint
11. Creates a copy of a string.
this
strcpy()
#include
continue
12. Nonexecutable statements that are included in a program to provide information about what the program does etc.
inheritance
comments
loader
heap
13. Every C++ program begins execution at the function _________.
main
void
#include directive
floating-point
14. Type casting syntax
showpoint
dot (.)
base class
static_cast<char>(65)
15. Function ________ is used to produce random numbers.
sorting
cin
rand
delete
16. The stream insertion operator
private
if...else
<<
void pointer
17. Two slash marks ( // ) indicate __________ of a comment
scope resolution operator
Default memberwise assignment
NULL
beginning
18. data types that refer to numbers with decimals
a.out
strlen()
floating-point
Preprocessor
19. A variable declared outside any block or function is a ________ variable.
sorting
Unified Modeling Language(UML)
void
global
20. Words that are used for special purposes in a program
public
address
reserved words
cmath
21. Used to qualify hidden names so that they can be used.
token
base
classes
scope resolution operator
22. The size & shape & color and weight of an object are considered
variable
attributes
subscript (or index)
case sensitive
23. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
semicolon
overloading
void
named constant
24. The sign you use for pointers
*
derived class
pointer
data type
25. An expression that has operands with different data types
*
mixed expression
static
virtual functions
26. The stream extraction operator
editor
sorting
getline
>>
27. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
void
data type
cmath
28. A __________ data member represents class-wide information.
loader
special symbols
type casting (conversion)
static
29. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
break
object-oriented analysis and design (OOAD)
delete
30. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
before
public
Arithmetic Operators
31. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
new line
inheritance
initialized
char
32. In inheritance the ____________ is the class the receives the inherited members.
NULL
getline
auto
derived class
33. 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.
operator overloading
virtual functions
Preprocessor
recursive function
34. Keyword public is a(n) _________
int values
global
access specifier
heap
35. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
#include <headerfilename>
const datatype identifier = value
//
36. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
preprocessor
named constant
const
37. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
register
n
data type
38. The address-of operator. it is used to assign pointers and to print the address of variables.
recursive
&
friend
virtual functions
39. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
reserved words
base
function overloading
n
40. Message displayed to the screen asking user for input; generated with an output statement
operand value
prompt
delete
return
41. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
#include
function call
#include <headerfilename>
42. Function ________ is used to set the random number seed to randomize a program.
constant variable
function overloading
srand
Unified Modeling Language(UML)
43. For every opening brace in a C++ program there must be a ______________.
syntax
comments
operand value
Closing brace
44. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
linker
friend
variables
variable
45. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
integer operands
getline
//
continue
46. int namespace include using return examples of ___________
Closing brace
reserve words
void pointer
opened
47. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
globals
Preprocessor
base
48. This manipulator causes the field to be left-justified with padding spaces printed to the right.
linker
#include
left
derived class
49. 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.
cmath
stack
vectors
/n
50. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
token
//
const
strcpy()