SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. An operator that can only be used with int values. result will always be an int.
information hiding
escape sequences
% modulus
?
2. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
0
case sensitive
default constructor
3. Identifier or expression that is part of the calculation to be performed
mixed expression
operand value
subscript (or index)
NULL
4. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
*
setw
register
information hiding
5. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
this
before
public
function scope
6. A variable that is known only within the function in which it is defined is called a ________.
const
associations
member
local variable
7. Used for function calls and local variables
Preprocessor
cin
overloading
stack
8. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
strcmp()
operator
globals
Counter-controlled or definite
9. Syntax for named constant declaration
initialized
a.out
const datatype identifier = value
strcpy()
10. 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.
getline
attributes
function call
/n
11. Words that are used for special purposes in a program
linker
public
reserved words
pointer
12. Forces the computer to display decimal point and trailing zeroes
showpoint
cout
unary operator
initialized
13. A pointer is a variable that contains as its value the____________ of another variable.
type
address
if
/n
14. Every C++ program begins execution at the function _________.
main
named constant
dot (.)
strcpy()
15. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
Unified Modeling Language(UML)
classes
preprocessor
assignment statement
16. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
cin >> variable
assignment statement
unary operator
17. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
named constant
private
const
auto
18. A member function should be declared static if it does not access __________ class members.
overloading
member
subscript (or index)
non-static
19. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
allocating memory
pointer
Default memberwise assignment
overloading
20. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
before
Counter-controlled or definite
semantics
recursive
21. The modulus operator (%) can be used only with __________.
named constant
preprocessor
endl (same as 'n')
integer operands
22. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
auto
two-dimensional
whitespace
23. Most calculations are normally performed by ______ statements.
operator overloading
assignment
floating-point
{ }
24. A set of values together with a set of operations
case sensitive
inheritance
data type
Unified Modeling Language(UML)
25. tab
source file
reserve words
t
floating-point
26. Names of things that are used in a program - can apply to variables & constants and functions
access specifier
variable
identifiers
srand
27. All C++ Variables are_________.
two-dimensional
this
?
case sensitive
28. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
recursive function
syntax
inline functions
operator overloading
29. A C++ statement that makes a decision is ______.
if
globals
pointer
operator overloading
30. A type of pointer that can point at objects of any data type.
void pointer
opened
>>
allocating memory
31. newline
Arithmetic Operators
preprocessor
register
n
32. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
strlen()
derived class
initialized
33. A function is invoked with a ________.
identifiers
const datatype identifier = value
fstream
function call
34. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
opened
prompt
special symbols
Unified Modeling Language(UML)
35. The sign you use for references
member
delete
&
void pointer
36. Returns the length of a string excluding the null terminator.
strlen()
static
global
register
37. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
information hiding
case sensitive
::
linker
38. Two slash marks ( // ) indicate __________ of a comment
mixed expression
Arithmetic Operators
source file
beginning
39. Class members specified as _________ are accessible anywhere an object of the class is in scope.
strlen()
binary operator
public
selection
40. The ________ enables access to a global variable with the same name as a variable in the current scope.
scope resolution operator
Preprocessor
unary scope resolution operator (::)
type
41. The number used to refer to a particular element of an array is called its ________.
//
if...else
subscript (or index)
unary operator
42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
operator
cin >> variable
cin
preprocessor
43. An expression in which all operands have the same data type - result will have the same data type as operands
left
register
initialized
like-type expression
44. The stream insertion operator
<<
function prototype
member
inheritance
45. Default name of executable file
*
a.out
reserved words
main
46. data types that refer to numbers with decimals
switch
if...else
floating-point
reserve words
47. Keyword public is a(n) _________
function overloading
initialized
strcmp()
access specifier
48. You can declare default values for a function in the ____________________.
ofstream
function overloading
base class
function parameters
49. To write data to a file you define an object of which one of the following
ofstream
mixed expression
operator overloading
?
50. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
definition
#include <headerfilename>
non-static
new line