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 stream insertion operator
type coercion
non-static
<<
this
2. A type of pointer that can point at objects of any data type.
endl (same as 'n')
cin >> variable
void
void pointer
3. A memory location with a name and data type - its content may be changed during program execution
before
prompt
variable
definition
4. These are data items whose values do not change while the program is running
Literals
char
strcmp()
/n
5. Used for function calls and local variables
opened
stack
reserved words
scope resolution operator
6. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
pointer
function scope
getline
recursive function
7. Returns the length of a string excluding the null terminator.
void pointer
reserve words
strlen()
linker
8. The _____ causes the contents of another file to be inserted into a program.
arithmetic expression
vectors
#include directive
attributes
9. newline
address
n
Literals
template
10. The stream extraction operator
>>
showpoint
break
type coercion
11. Names of things that are used in a program - can apply to variables & constants and functions
Literals
identifiers
special symbols
globals
12. If a member initializer is not provided for a member object of a class the object's __________ is called.
ofstream
default constructor
named constant
function call
13. Class members specified as _________ are accessible anywhere an object of the class is in scope.
strcmp()
allocating memory
static
public
14. tab
register
srand
t
reserved words
15. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
non-static
data type
strlen()
new line
16. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
void
register
definition
like-type expression
17. Every C++ statement ends with a(n) _________.
semicolon
cin
NULL
Arithmetic Operators
18. Preprocessor directive syntax
private
#include <headerfilename>
cin >> variable
type casting (conversion)
19. Every C++ program begins execution at the function _________.
arithmetic expression
main
syntax
information hiding
20. directive A statement that starts with a # is called a ____________.
Preprocessor
access specifier
recursive
cin
21. To explicitly indicate that a value is to be converted to another type
Stack overflow
type casting (conversion)
editor
type
22. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
vectors
fixed
//
type
23. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
&
register
Semicolon
access specifier
24. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
classes
token
allocating memory
public
25. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
type
0
% modulus
pointer
26. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
associations
arithmetic expression
classes
const
27. A constant object must be __________; it cannot be modified after it is created.
pointer
0
initialized
virtual functions
28. The ________ of an identifier is the portion of the program in which the identifier can be used.
integer operands
operator
definition
scope
29. Compares two strings and returns 0 if they are equal.
function overloading
source file
variables
strcmp()
30. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
{ }
polymorphism
cin >> variable
::
31. The __________ operator reclaims memory previously allocated by new.
delete
escape sequences
Default memberwise assignment
void pointer
32. In inheritance the ____________ is the class that supplies the inherited members.
base class
preprocessor
Literals
semantics
33. An operator that can only be used with int values. result will always be an int.
% modulus
const
classes
Stack overflow
34. The process of placing the elements of an array in order is called ________ the array.
default constructor
sorting
continue
static_cast<char>(65)
35. You can declare default values for a function in the ____________________.
function parameters
strcpy()
reserved words
srand
36. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
return
selection
this
Sentinel
37. 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
continue
type
dot (.)
38. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
floating-point
virtual functions
base class
39. An expression that has operands with different data types
dot (.)
unary scope resolution operator (::)
mixed expression
fstream
40. The sign you use for references
const datatype identifier = value
two-dimensional
&
linker
41. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
dot (.)
getline
endl (same as 'n')
42. Function ________ is used to produce random numbers.
operand value
rand
constant variable
>>
43. * / % + -
Arithmetic Operators
virtual functions
reserved words
linker
44. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
type coercion
overloading
void pointer
register
45. 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
46. The elements of an array are related by the fact that they have the same name and ___________.
const
type
function overloading
identifiers
47. data types that refer to numbers with decimals
floating-point
case sensitive
Preprocessor
source file
48. The process of analyzing and designing a system from an object-oriented point of view is called ________.
default constructor
function prototype
function scope
object-oriented analysis and design (OOAD)
49. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
if...else
Default memberwise assignment
assignment
switch
50. A __________ data member represents class-wide information.
reserve words
strcmp()
static
endl (same as 'n')