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. 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.
continue
type casting (conversion)
::
n
2. An operator that can only be used with int values. result will always be an int.
% modulus
derived class
void
function prototype
3. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
base
object file
return
const
4. The modulus operator (%) can be used only with __________.
template
left
inheritance
integer operands
5. Naming convention for C++ programs
opened
unary operator
.cpp
cin >> variable
6. A function is invoked with a ________.
fixed
function call
this
assignment
7. The ________ qualifier is used to declare read-only variables.
selection
const
Semicolon
new line
8. Characters used to separate symbols or reserved words or identifiers and statements
this
whitespace
cin.get(ch)
scope resolution operator
9. The sign you use for pointers
Counter-controlled or definite
virtual functions
loader
*
10. Two slash marks ( // ) indicate __________ of a comment
beginning
strlen()
Unified Modeling Language(UML)
preprocessor
11. The _________ begins the body of every function and the _________ ends the body of every function.
associations
variables
Literals
{ }
12. You can declare default values for a function in the ____________________.
selection
allocating memory
function parameters
syntax
13. In inheritance the ____________ is the class the receives the inherited members.
derived class
opened
/n
ofstream
14. The stream insertion operator
Sentinel
classes
<<
source file
15. Function ________ is used to produce random numbers.
virtual functions
source file
rand
>>
16. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
information hiding
fstream
mixed expression
17. Allows the programmer to store a value in a variable
n
t
assignment statement
floating-point
18. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
main
semantics
dot (.)
cin
19. Grammar rules of the language; compiler will try to identify and locate syntax errors
data type
global
opened
syntax
20. Whole numbers - no decimals and no commas included
base class
int values
char
variables
21. Every C++ statement ends with a(n) _________.
Default memberwise assignment
searching
cin.get(ch)
semicolon
22. Preprocessor directive syntax
#include <headerfilename>
function call
Preprocessor
token
23. Classes can have relationships with other classes. These relationships are called ________.
cmath
{ }
associations
Sentinel
24. A file must be ________ before data can be written to or read from it.
inline functions
opened
function parameters
non-static
25. Class members are accessed via the ________ operator in conjunction with the name of an object (or reference to an object) of the class or via the arrow (->) operator in conjunction with a pointer to an object of the class.
void
strcmp()
access specifier
dot (.)
26. A filestream variable that represents the default output device
cout
derived class
delete
strcpy()
27. Forces the computer to display decimal point and trailing zeroes
strcpy()
function overloading
case sensitive
showpoint
28. To write data to a file you define an object of which one of the following
associations
pointer
char
ofstream
29. The ________ program transfers the executable image of a C++ program from disk to memory.
subscript (or index)
loader
template
cin >> variable
30. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
globals
Counter-controlled or definite
scope resolution operator
#include
31. directive A statement that starts with a # is called a ____________.
data type
selection
function overloading
Preprocessor
32. A filestream variable that represents the default input source
cin
subscript (or index)
.cpp
return
33. 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.
#include directive
beginning
information hiding
object file
34. Class members specified as _________ are accessible anywhere an object of the class is in scope.
recursive function
default constructor
public
inline functions
35. Type casting syntax
function call
static_cast<char>(65)
cin >> variable
function overloading
36. Nonexecutable statements that are included in a program to provide information about what the program does etc.
attributes
comments
private
overloading
37. The address-of operator. it is used to assign pointers and to print the address of variables.
object-oriented analysis and design (OOAD)
&
const datatype identifier = value
constant variable
38. These are data items whose values do not change while the program is running
//
register
Literals
mixed expression
39. __________ can be used to assign an object of a class to another object of the same class.
recursive function
Default memberwise assignment
whitespace
&
40. 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.
Literals
type casting (conversion)
void
address
41. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
return
constant variable
Stack overflow
const
42. The ________ enables access to a global variable with the same name as a variable in the current scope.
address
&
pointer
unary scope resolution operator (::)
43. Compares two strings and returns 0 if they are equal.
strcmp()
&
associations
definition
44. The number used to refer to a particular element of an array is called its ________.
return
switch
subscript (or index)
opened
45. Returns the length of a string excluding the null terminator.
#include
base
strlen()
dot (.)
46. The storage-class specifiers are mutable - auto - ________ - extern and static.
register
Counter-controlled or definite
type casting (conversion)
*
47. The stream extraction operator
floating-point
>>
prompt
a.out
48. Operator with two operands
named constant
void
binary operator
endl (same as 'n')
49. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
dot (.)
polymorphism
attributes
50. = & | are examples of ____________.
object file
private
special symbols
return