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. Operator with only one operand
auto
register
scope resolution operator
unary operator
2. Forces the computer to display decimal point and trailing zeroes
NULL
showpoint
access specifier
#include directive
3. The three values that can be used to initialize a pointer are 0 - __________ and an address.
return
template
arithmetic expression
NULL
4. A function that can be used to read character data including whitespace
Semicolon
cin.get(ch)
base class
definition
5. The elements of an array are related by the fact that they have the same name and ___________.
object-oriented analysis and design (OOAD)
type
&
globals
6. The _____ causes the contents of another file to be inserted into a program.
cmath
data type
Unified Modeling Language(UML)
#include directive
7. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
Sentinel
&
static
selection
8. Whole numbers - no decimals and no commas included
if
int values
operand value
scope
9. int namespace include using return examples of ___________
cmath
reserve words
>>
semantics
10. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
>>
constant variable
token
default constructor
11. When a value of one data type is implicitly (automatically) changed to another data type
assignment statement
continue
scope resolution operator
type coercion
12. Class members specified as _________ are accessible anywhere an object of the class is in scope.
srand
function scope
strcpy()
public
13. Member objects are constructed __________ their enclosing class object.
auto
continue
before
sorting
14. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
comments
beginning
friend
this
15. All C++ Variables are_________.
token
case sensitive
Closing brace
scope
16. Type casting syntax
pointer
static_cast<char>(65)
delete
whitespace
17. Repeating a set of instructions a specific number of times is called_________repetition.
syntax
before
Counter-controlled or definite
function scope
18. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
two-dimensional
setw
char
data type
19. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
type casting (conversion)
source file
information hiding
20. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
variable
>>
operator
21. Function ________ is used to produce random numbers.
?
rand
arithmetic expression
::
22. The storage-class specifiers are mutable - auto - ________ - extern and static.
strcpy()
pointer
register
Literals
23. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
classes
case sensitive
identifiers
24. Words that are used for special purposes in a program
reserved words
associations
>>
ofstream
25. Every C++ program begins execution at the function _________.
operator overloading
strlen()
void pointer
main
26. A human readable file that contains C++ program
NULL
source file
//
unary scope resolution operator (::)
27. To write data to a file you define an object of which one of the following
associations
int values
cout
ofstream
28. Lists and tables of values can be stored in arrays or __________.
editor
vectors
continue
function scope
29. Sets floating-point values to a fixed decimal format
{ }
fixed
floating-point
#include <headerfilename>
30. The ________ statement in a called function passes the value of an expression back to the calling function.
return
prompt
assignment
searching
31. C++ programs are normally typed into a computer using a(n) ________ program.
editor
getline
heap
Semicolon
32. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
continue
const
inline functions
pointer
33. The address-of operator. it is used to assign pointers and to print the address of variables.
associations
&
reserve words
break
34. The modulus operator (%) can be used only with __________.
polymorphism
integer operands
pointer
object file
35. An expression in which all operands have the same data type - result will have the same data type as operands
scope resolution operator
like-type expression
dot (.)
*
36. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
whitespace
arithmetic expression
left
37. 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.
>>
.cpp
endl (same as 'n')
/n
38. Symbol that denotes an action to be performed
return
operator
globals
unary operator
39. The ________ qualifier is used to declare read-only variables.
editor
assignment
const
operator
40. Classes can have relationships with other classes. These relationships are called ________.
cin >> variable
identifiers
Closing brace
associations
41. 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.
strcpy()
beginning
void
recursive
42. Syntax for named constant declaration
const datatype identifier = value
reserve words
scope resolution operator
//
43. The only integer that can be assigned directly to a pointer is_____________.
reserve words
0
information hiding
&
44. * / % + -
pointer
?
{ }
Arithmetic Operators
45. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
auto
getline
cmath
#include
46. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
loader
variable
named constant
if...else
47. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
continue
polymorphism
dot (.)
Semicolon
48. A pointer is a variable that contains as its value the____________ of another variable.
initialized
operator
address
endl (same as 'n')
49. Operator with two operands
break
binary operator
base
classes
50. = & | are examples of ____________.
selection
#include <headerfilename>
special symbols
function prototype