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. Compares two strings and returns 0 if they are equal.
pointer
searching
strcmp()
classes
2. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
const
case sensitive
n
3. newline
n
const
cin >> variable
virtual functions
4. An array that uses two subscripts is referred to as a(n) _________ array.
strlen()
token
two-dimensional
non-static
5. A function that can be used to read character data including whitespace
srand
switch
Arithmetic Operators
cin.get(ch)
6. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include
beginning
syntax
recursive function
7. Associate an identifier with a memory location
allocating memory
//
derived class
heap
8. 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.
opened
main
>>
continue
9. A set of values together with a set of operations
private
template
function call
data type
10. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
overloading
function call
pointer
11. Every C++ statement ends with a(n) _________.
>>
information hiding
semicolon
mixed expression
12. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
cin.get(ch)
dot (.)
overloading
inline functions
13. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
getline
definition
return
Counter-controlled or definite
14. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
&
derived class
cin.get(ch)
15. Characters used to separate symbols or reserved words or identifiers and statements
::
*
constant variable
whitespace
16. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
#include <headerfilename>
getline
opened
17. A constant object must be __________; it cannot be modified after it is created.
initialized
return
left
setw
18. The _____ causes the contents of another file to be inserted into a program.
function parameters
like-type expression
#include directive
t
19. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
polymorphism
selection
pointer
showpoint
20. A filestream variable that represents the default output device
% modulus
cout
const
Counter-controlled or definite
21. In inheritance the ____________ is the class that supplies the inherited members.
base class
object-oriented analysis and design (OOAD)
register
endl (same as 'n')
22. data types that refer to numbers with decimals
NULL
auto
case sensitive
floating-point
23. A file must be ________ before data can be written to or read from it.
scope
opened
operand value
register
24. The process of determining if an array contains a particular key value is called _________ the array.
searching
object file
escape sequences
special symbols
25. Every C++ program begins execution at the function _________.
type coercion
global
main
beginning
26. 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.
cin >> variable
a.out
globals
void
27. Identifier or expression that is part of the calculation to be performed
template
classes
operand value
strlen()
28. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
initialized
void
//
register
29. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
function scope
constant variable
function prototype
break
30. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
<<
named constant
semicolon
31. Allows the programmer to store a value in a variable
assignment statement
Counter-controlled or definite
#include <headerfilename>
pointer
32. The size & shape & color and weight of an object are considered
assignment statement
left
char
attributes
33. A __________ data member represents class-wide information.
Counter-controlled or definite
ofstream
static
comments
34. A member function should be declared static if it does not access __________ class members.
data type
non-static
recursive function
template
35. The storage-class specifiers are mutable - auto - ________ - extern and static.
?
opened
register
initialized
36. Message displayed to the screen asking user for input; generated with an output statement
prompt
if
whitespace
a.out
37. A variable that holds the address of another variable.
pointer
Unified Modeling Language(UML)
two-dimensional
initialized
38. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
escape sequences
dot (.)
cin >> variable
address
39. directive A statement that starts with a # is called a ____________.
variables
a.out
object file
Preprocessor
40. tab
identifiers
initialized
preprocessor
t
41. __________ can be used to assign an object of a class to another object of the same class.
classes
Default memberwise assignment
two-dimensional
binary operator
42. 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.
cin.get(ch)
Sentinel
cin
inheritance
43. Function ________ is used to produce random numbers.
Literals
rand
arithmetic expression
Closing brace
44. 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.
inheritance
private
Default memberwise assignment
overloading
45. Default name of executable file
associations
special symbols
n
a.out
46. The __________ operator reclaims memory previously allocated by new.
assignment statement
vectors
delete
overloading
47. This is used to mark the end of a complete C++ programming statement.
global
member
Semicolon
two-dimensional
48. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
heap
associations
recursive
.cpp
49. These are data items whose values do not change while the program is running
comments
unary scope resolution operator (::)
Literals
t
50. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
before
char
floating-point