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. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
static
arithmetic expression
char
two-dimensional
2. The ________ statement in a called function passes the value of an expression back to the calling function.
inheritance
return
opened
preprocessor
3. For every opening brace in a C++ program there must be a ______________.
object file
Closing brace
before
static_cast<char>(65)
4. In inheritance the ____________ is the class that supplies the inherited members.
comments
*
base class
scope resolution operator
5. Two slash marks ( // ) indicate __________ of a comment
function call
beginning
::
Default memberwise assignment
6. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
fixed
function overloading
NULL
token
7. 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
operand value
Arithmetic Operators
selection
8. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
{ }
token
integer operands
9. Names of things that are used in a program - can apply to variables & constants and functions
constant variable
static
recursive function
identifiers
10. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
fstream
Sentinel
linker
const
11. You must have a ___________ for every variable you intend to use in a program
return
showpoint
definition
function call
12. The idea that you can call the same function and the output will depend on the type of object you're using.
member
polymorphism
initialized
vectors
13. An operator that can only be used with int values. result will always be an int.
source file
vectors
% modulus
classes
14. An array that uses two subscripts is referred to as a(n) _________ array.
cin
data type
function scope
two-dimensional
15. A pointer is a variable that contains as its value the____________ of another variable.
object-oriented analysis and design (OOAD)
address
t
if
16. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
type casting (conversion)
Preprocessor
recursive
non-static
17. The address-of operator. it is used to assign pointers and to print the address of variables.
strcpy()
fixed
&
setw
18. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
Counter-controlled or definite
stack
void pointer
overloading
19. Returns the length of a string excluding the null terminator.
showpoint
overloading
strlen()
before
20. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
.cpp
setw
named constant
inline functions
21. The ________ of an identifier is the portion of the program in which the identifier can be used.
strcpy()
heap
preprocessor
scope
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
whitespace
new line
virtual functions
#include directive
23. The ________ qualifier is used to declare read-only variables.
inline functions
const
&
classes
24. The sign you use for references
whitespace
Literals
fixed
&
25. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
delete
const datatype identifier = value
Arithmetic Operators
26. 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.
?
template
escape sequences
register
27. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
getline
setw
register
reserved words
28. The elements of an array are related by the fact that they have the same name and ___________.
friend
non-static
allocating memory
type
29. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
operator
unary scope resolution operator (::)
vectors
pointer
30. 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.
object-oriented analysis and design (OOAD)
heap
variables
virtual functions
31. A constant object must be __________; it cannot be modified after it is created.
prompt
whitespace
initialized
a.out
32. The three values that can be used to initialize a pointer are 0 - __________ and an address.
reserved words
NULL
Semicolon
information hiding
33. Whole numbers - no decimals and no commas included
binary operator
semantics
int values
static
34. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
heap
classes
special symbols
a.out
35. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
address
endl (same as 'n')
<<
function prototype
36. An expression that has operands with different data types
special symbols
reserved words
arithmetic expression
mixed expression
37. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
preprocessor
public
allocating memory
friend
38. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
char
a.out
static
39. Naming convention for C++ programs
globals
sorting
const datatype identifier = value
.cpp
40. Every C++ statement ends with a(n) _________.
semicolon
virtual functions
Arithmetic Operators
Closing brace
41. The stream insertion operator
<<
strcmp()
n
fixed
42. Symbol that denotes an action to be performed
cin.get(ch)
editor
Preprocessor
operator
43. = & | are examples of ____________.
mixed expression
address
special symbols
non-static
44. A variable declared outside any block or function is a ________ variable.
Default memberwise assignment
semantics
vectors
global
45. Words that are used for special purposes in a program
*
type coercion
.cpp
reserved words
46. The ________ program transfers the executable image of a C++ program from disk to memory.
whitespace
delete
loader
comments
47. Preprocessor directive syntax
private
pointer
stack
#include <headerfilename>
48. Used for function calls and local variables
associations
static
stack
constant variable
49. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
base class
scope
whitespace
private
50. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
non-static
.cpp
endl (same as 'n')
cin >> variable