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. A variable that is known only within the function in which it is defined is called a ________.
setw
local variable
pointer
base class
2. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
reserved words
private
reserve words
3. Type casting syntax
static_cast<char>(65)
token
mixed expression
/n
4. Creates a copy of a string.
escape sequences
Closing brace
strcpy()
reserve words
5. A program that finds and attaches to your program the indicated libraries for compilation
void pointer
loader
*
preprocessor
6. A filestream variable that represents the default output device
main
showpoint
cout
linker
7. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
friend
new line
0
8. The symbol for the binary scope resolution operator
cin
fstream
beginning
::
9. Lists and tables of values can be stored in arrays or __________.
this
vectors
Unified Modeling Language(UML)
editor
10. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
assignment
stack
prompt
named constant
11. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
% modulus
global
access specifier
switch
12. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
cin.get(ch)
arithmetic expression
function prototype
globals
13. Forces the computer to display decimal point and trailing zeroes
showpoint
subscript (or index)
variables
pointer
14. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
classes
static
//
15. The ________ qualifier is used to declare read-only variables.
const
&
access specifier
integer operands
16. Sets floating-point values to a fixed decimal format
heap
subscript (or index)
.cpp
fixed
17. Compares two strings and returns 0 if they are equal.
binary operator
strcmp()
operand value
like-type expression
18. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
local variable
object file
cin >> variable
const
19. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
type casting (conversion)
virtual functions
auto
object file
20. A variable that holds the address of another variable.
scope resolution operator
unary scope resolution operator (::)
pointer
main
21. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
mixed expression
non-static
selection
virtual functions
22. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
srand
globals
new line
break
23. A sequence of operands and operators that describe a calculation to be performed
arithmetic expression
strlen()
searching
function parameters
24. Header file that contains commonly performed mathematical functions
subscript (or index)
binary operator
cmath
function prototype
25. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
void
cin.get(ch)
&
26. A variable declared outside any block or function is a ________ variable.
function scope
<<
global
Stack overflow
27. An array that uses two subscripts is referred to as a(n) _________ array.
unary operator
beginning
scope resolution operator
two-dimensional
28. The stream insertion operator
<<
case sensitive
.cpp
reserve words
29. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
semantics
const
main
Arithmetic Operators
30. data types that refer to numbers with decimals
floating-point
if...else
Closing brace
function parameters
31. To allow file access in a program you must #include this header file.
loader
fstream
assignment
main
32. Used for function calls and local variables
type coercion
Unified Modeling Language(UML)
stack
cin >> variable
33. The _________ begins the body of every function and the _________ ends the body of every function.
arithmetic expression
Unified Modeling Language(UML)
opened
{ }
34. A __________ should be used to declare the size of an array because it makes the program more scalable.
const
Sentinel
constant variable
if...else
35. __________ can be used to assign an object of a class to another object of the same class.
&
reserved words
break
Default memberwise assignment
36. Every C++ statement ends with a(n) _________.
semicolon
new line
mixed expression
::
37. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
Counter-controlled or definite
function prototype
scope
overloading
38. Nonexecutable statements that are included in a program to provide information about what the program does etc.
data type
inheritance
comments
default constructor
39. Names of things that are used in a program - can apply to variables & constants and functions
int values
dot (.)
identifiers
srand
40. A function is invoked with a ________.
function call
Closing brace
n
const datatype identifier = value
41. Allows the programmer to store a value in a variable
assignment statement
n
stack
&
42. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
//
delete
Counter-controlled or definite
43. This manipulator causes the field to be left-justified with padding spaces printed to the right.
information hiding
left
function prototype
template
44. A ________ program executes before the compiler's translation phase begins.
non-static
arithmetic expression
operand value
preprocessor
45. A __________ data member represents class-wide information.
static
delete
object-oriented analysis and design (OOAD)
semantics
46. To write data to a file you define an object of which one of the following
identifiers
ofstream
::
arithmetic expression
47. Syntax for named constant declaration
pointer
reserve words
const datatype identifier = value
cmath
48. The sign you use for pointers
*
subscript (or index)
void
main
49. 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.
delete
strcmp()
continue
int values
50. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
recursive
attributes
assignment
register