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. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
type
special symbols
Literals
token
2. Whole numbers - no decimals and no commas included
return
int values
operand value
cout
3. A __________ should be used to declare the size of an array because it makes the program more scalable.
//
scope resolution operator
constant variable
loader
4. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
stack
linker
identifiers
#include
5. Grammar rules of the language; compiler will try to identify and locate syntax errors
globals
pointer
fixed
syntax
6. * / % + -
fstream
Unified Modeling Language(UML)
Arithmetic Operators
operator
7. The stream insertion operator
<<
polymorphism
::
reserve words
8. __________ can be used to assign an object of a class to another object of the same class.
strcmp()
mixed expression
?
Default memberwise assignment
9. Preprocessor directive syntax
a.out
globals
#include <headerfilename>
return
10. To explicitly indicate that a value is to be converted to another type
Closing brace
type casting (conversion)
sorting
classes
11. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
before
NULL
loader
12. A program that finds and attaches to your program the indicated libraries for compilation
return
preprocessor
recursive function
before
13. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
allocating memory
?
ofstream
14. A filestream variable that represents the default input source
cin
*
type coercion
recursive
15. In inheritance the ____________ is the class that supplies the inherited members.
recursive function
polymorphism
variable
base class
16. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
static_cast<char>(65)
object-oriented analysis and design (OOAD)
assignment
new line
17. Operator with only one operand
unary operator
left
return
semantics
18. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
Stack overflow
auto
>>
two-dimensional
19. The symbol for the binary scope resolution operator
::
fstream
constant variable
address
20. To write data to a file you define an object of which one of the following
strcpy()
cin
vectors
ofstream
21. The storage-class specifiers are mutable - auto - ________ - extern and static.
&
register
Closing brace
strcpy()
22. Classes can have relationships with other classes. These relationships are called ________.
switch
non-static
type coercion
associations
23. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
Counter-controlled or definite
Arithmetic Operators
cout
24. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
semicolon
floating-point
assignment statement
25. 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.
operand value
continue
static_cast<char>(65)
definition
26. newline
derived class
integer operands
n
associations
27. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
friend
operand value
comments
28. The three values that can be used to initialize a pointer are 0 - __________ and an address.
globals
&
function scope
NULL
29. When a value of one data type is implicitly (automatically) changed to another data type
type coercion
binary operator
ofstream
fixed
30. Program components in C++ are called functions and ________.
t
globals
operand value
classes
31. Used for function calls and local variables
stack
&
register
semantics
32. A __________ data member represents class-wide information.
token
/n
static
selection
33. Function ________ is used to set the random number seed to randomize a program.
Unified Modeling Language(UML)
srand
editor
>>
34. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
stack
private
*
35. Sets floating-point values to a fixed decimal format
special symbols
operand value
virtual functions
fixed
36. A human readable file that contains C++ program
classes
associations
Counter-controlled or definite
source file
37. tab
t
inheritance
object file
const
38. Message displayed to the screen asking user for input; generated with an output statement
function prototype
Default memberwise assignment
prompt
named constant
39. Used for dynamically allocated variables
heap
inline functions
void pointer
strcmp()
40. Operator with two operands
cin >> variable
binary operator
arithmetic expression
#include <headerfilename>
41. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
local variable
identifiers
inline functions
function parameters
42. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
linker
selection
getline
globals
43. The only integer that can be assigned directly to a pointer is_____________.
type
0
/n
cin.get(ch)
44. Names of things that are used in a program - can apply to variables & constants and functions
{ }
cin
beginning
identifiers
45. Forces the computer to display decimal point and trailing zeroes
showpoint
type coercion
inline functions
associations
46. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
case sensitive
information hiding
member
47. Function ________ is used to produce random numbers.
static
function call
base
rand
48. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
inheritance
recursive
member
special symbols
49. A function is invoked with a ________.
attributes
return
const datatype identifier = value
function call
50. The process of placing the elements of an array in order is called ________ the array.
public
sorting
semicolon
loader