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. Names of things that are used in a program - can apply to variables & constants and functions
loader
identifiers
::
main
2. Associate an identifier with a memory location
allocating memory
attributes
subscript (or index)
#include <headerfilename>
3. These are data items whose values do not change while the program is running
mixed expression
Literals
identifiers
address
4. When a value of one data type is implicitly (automatically) changed to another data type
strcmp()
operand value
type coercion
operator
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.
static
source file
prompt
left
6. tab
t
initialized
reserved words
allocating memory
7. An expression in which all operands have the same data type - result will have the same data type as operands
&
const datatype identifier = value
like-type expression
recursive function
8. 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.
strcpy()
void
two-dimensional
operand value
9. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
linker
Closing brace
escape sequences
function prototype
10. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
operator
function overloading
mixed expression
main
11. Header file that contains commonly performed mathematical functions
cmath
subscript (or index)
static
void pointer
12. A C++ statement that makes a decision is ______.
polymorphism
if
attributes
prompt
13. Whole numbers - no decimals and no commas included
comments
int values
showpoint
address
14. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
definition
getline
//
scope resolution operator
15. A filestream variable that represents the default output device
cout
object file
#include <headerfilename>
int values
16. All C++ Variables are_________.
n
case sensitive
before
{ }
17. A function that can be used to read character data including whitespace
floating-point
endl (same as 'n')
switch
cin.get(ch)
18. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
cin >> variable
private
linker
source file
19. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
attributes
>>
syntax
inline functions
20. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
main
editor
function prototype
21. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
local variable
Unified Modeling Language(UML)
left
void
22. Repeating a set of instructions a specific number of times is called_________repetition.
ofstream
Counter-controlled or definite
/n
virtual functions
23. The __________ operator reclaims memory previously allocated by new.
comments
delete
public
operand value
24. All ______ must be declared before they are used.
% modulus
preprocessor
variables
case sensitive
25. Every C++ statement ends with a(n) _________.
type casting (conversion)
rand
#include directive
semicolon
26. A variable declared outside any block or function is a ________ variable.
member
function overloading
NULL
global
27. A human readable file that contains C++ program
heap
showpoint
source file
preprocessor
28. C++ programs are normally typed into a computer using a(n) ________ program.
assignment statement
unary scope resolution operator (::)
editor
const
29. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
base
constant variable
.cpp
30. In inheritance the ____________ is the class that supplies the inherited members.
object-oriented analysis and design (OOAD)
base class
type coercion
classes
31. A file must be ________ before data can be written to or read from it.
pointer
object file
opened
Counter-controlled or definite
32. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
token
assignment statement
char
non-static
33. Forces the computer to display decimal point and trailing zeroes
heap
showpoint
this
const datatype identifier = value
34. 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.
#include
?
cmath
searching
35. A ________ program executes before the compiler's translation phase begins.
cin >> variable
token
classes
preprocessor
36. The only integer that can be assigned directly to a pointer is_____________.
stack
0
delete
scope
37. The sign you use for pointers
Semicolon
preprocessor
prompt
*
38. The stream extraction operator
function overloading
beginning
Sentinel
>>
39. A variable that is known only within the function in which it is defined is called a ________.
recursive
beginning
local variable
two-dimensional
40. Syntax for named constant declaration
inline functions
t
auto
const datatype identifier = value
41. Naming convention for C++ programs
void
.cpp
cin.get(ch)
srand
42. Type casting syntax
Closing brace
binary operator
register
static_cast<char>(65)
43. The address-of operator. it is used to assign pointers and to print the address of variables.
definition
loader
assignment
&
44. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
setw
register
loader
classes
45. The ________ program transfers the executable image of a C++ program from disk to memory.
Default memberwise assignment
char
named constant
loader
46. For every opening brace in a C++ program there must be a ______________.
member
dot (.)
Closing brace
virtual functions
47. data types that refer to numbers with decimals
function call
function scope
auto
floating-point
48. The three values that can be used to initialize a pointer are 0 - __________ and an address.
classes
NULL
operand value
cout
49. An operator that can only be used with int values. result will always be an int.
floating-point
Counter-controlled or definite
% modulus
pointer
50. 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.
/n
recursive function
named constant
object file