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. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function scope
function overloading
int values
function prototype
2. A filestream variable that represents the default output device
cout
{ }
classes
information hiding
3. Forces the computer to display decimal point and trailing zeroes
showpoint
source file
special symbols
preprocessor
4. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
non-static
Default memberwise assignment
token
5. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
rand
?
vectors
static
6. These are data items whose values do not change while the program is running
Literals
default constructor
void pointer
if
7. 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
fixed
virtual functions
before
8. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
syntax
recursive function
void
like-type expression
9. The ________ program combines the output of the compiler with various library functions to produce an executable image.
return
linker
auto
editor
10. A ________ program executes before the compiler's translation phase begins.
preprocessor
cin >> variable
#include
public
11. Type casting syntax
syntax
static_cast<char>(65)
sorting
polymorphism
12. Default name of executable file
a.out
associations
strlen()
/n
13. The modulus operator (%) can be used only with __________.
Counter-controlled or definite
cin.get(ch)
integer operands
strlen()
14. You can declare default values for a function in the ____________________.
switch
object file
case sensitive
function parameters
15. C++ programs are normally typed into a computer using a(n) ________ program.
recursive function
sorting
{ }
editor
16. A C++ statement that makes a decision is ______.
if
Semicolon
auto
dot (.)
17. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
attributes
global
pointer
token
18. An expression in which all operands have the same data type - result will have the same data type as operands
delete
inheritance
.cpp
like-type expression
19. __________ can be used to assign an object of a class to another object of the same class.
object-oriented analysis and design (OOAD)
selection
classes
Default memberwise assignment
20. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
auto
getline
special symbols
if...else
21. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Sentinel
beginning
function prototype
prompt
22. This manipulator causes the field to be left-justified with padding spaces printed to the right.
left
reserved words
return
type
23. To explicitly indicate that a value is to be converted to another type
unary scope resolution operator (::)
polymorphism
type casting (conversion)
Default memberwise assignment
24. The ________ program transfers the executable image of a C++ program from disk to memory.
attributes
0
loader
heap
25. An expression that has operands with different data types
operand value
Stack overflow
mixed expression
inheritance
26. The address-of operator. it is used to assign pointers and to print the address of variables.
break
vectors
&
assignment
27. Class members specified as _________ are accessible anywhere an object of the class is in scope.
semicolon
Stack overflow
operator overloading
public
28. Names of things that are used in a program - can apply to variables & constants and functions
static_cast<char>(65)
*
identifiers
classes
29. Message displayed to the screen asking user for input; generated with an output statement
return
access specifier
recursive function
prompt
30. Used to qualify hidden names so that they can be used.
opened
vectors
floating-point
scope resolution operator
31. = & | are examples of ____________.
opened
special symbols
private
classes
32. Used for function calls and local variables
token
stack
Unified Modeling Language(UML)
recursive function
33. A member function should be declared static if it does not access __________ class members.
cmath
heap
non-static
dot (.)
34. Two slash marks ( // ) indicate __________ of a comment
recursive
allocating memory
Unified Modeling Language(UML)
beginning
35. Whole numbers - no decimals and no commas included
arithmetic expression
int values
register
semantics
36. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
object file
selection
t
vectors
37. A constant object must be __________; it cannot be modified after it is created.
switch
pointer
initialized
a.out
38. A variable declared outside any block or function is a ________ variable.
::
left
global
auto
39. Sets floating-point values to a fixed decimal format
scope
Preprocessor
fixed
left
40. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
void
cout
classes
41. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cout
preprocessor
cin >> variable
floating-point
42. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
like-type expression
operator overloading
<<
unary operator
43. The __________ operator reclaims memory previously allocated by new.
delete
classes
loader
token
44. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Literals
Stack overflow
char
beginning
45. A pointer is a variable that contains as its value the____________ of another variable.
before
address
inheritance
cin >> variable
46. Allows the programmer to store a value in a variable
assignment statement
Closing brace
case sensitive
virtual functions
47. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
inheritance
named constant
auto
static
48. 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.
reserved words
static_cast<char>(65)
?
local variable
49. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
50. The process of determining if an array contains a particular key value is called _________ the array.
getline
cin.get(ch)
new line
searching