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 human readable file that contains C++ program
source file
type casting (conversion)
public
register
2. The only integer that can be assigned directly to a pointer is_____________.
operator overloading
local variable
0
const
3. * / % + -
default constructor
Arithmetic Operators
Closing brace
delete
4. The process of placing the elements of an array in order is called ________ the array.
sorting
*
Closing brace
Unified Modeling Language(UML)
5. Names of things that are used in a program - can apply to variables & constants and functions
cout
friend
identifiers
object-oriented analysis and design (OOAD)
6. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
scope resolution operator
NULL
0
this
7. An expression that has operands with different data types
two-dimensional
mixed expression
special symbols
n
8. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
9. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
two-dimensional
heap
main
10. A member function should be declared static if it does not access __________ class members.
non-static
fixed
return
pointer
11. To allow file access in a program you must #include this header file.
source file
>>
global
fstream
12. The address-of operator. it is used to assign pointers and to print the address of variables.
preprocessor
public
arithmetic expression
&
13. A __________ should be used to declare the size of an array because it makes the program more scalable.
void pointer
function parameters
constant variable
showpoint
14. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
source file
//
public
before
15. = & | are examples of ____________.
base class
special symbols
Stack overflow
type
16. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
sorting
escape sequences
void
static
17. Grammar rules of the language; compiler will try to identify and locate syntax errors
object-oriented analysis and design (OOAD)
default constructor
syntax
allocating memory
18. A file must be ________ before data can be written to or read from it.
auto
loader
public
opened
19. A function ________ enables a single function to be defined to perform a task on many different data types.
strcpy()
new line
template
stack
20. Lists and tables of values can be stored in arrays or __________.
subscript (or index)
vectors
searching
allocating memory
21. 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.
static
continue
assignment
information hiding
22. The _________ begins the body of every function and the _________ ends the body of every function.
classes
arithmetic expression
setw
{ }
23. The size & shape & color and weight of an object are considered
overloading
register
inline functions
attributes
24. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
Default memberwise assignment
cin >> variable
static_cast<char>(65)
inline functions
25. The stream insertion operator
base
&
<<
fixed
26. 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.
reserve words
heap
variables
information hiding
27. To write data to a file you define an object of which one of the following
ofstream
fixed
associations
Semicolon
28. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
return
break
left
rand
29. A __________ data member represents class-wide information.
//
preprocessor
static
beginning
30. A memory location with a name and data type - its content may be changed during program execution
variable
type coercion
searching
binary operator
31. A function that calls itself
/n
cin >> variable
void pointer
recursive function
32. Words that are used for special purposes in a program
auto
reserved words
main
source file
33. A program that finds and attaches to your program the indicated libraries for compilation
cin
#include
const
preprocessor
34. __________ can be used to assign an object of a class to another object of the same class.
&
local variable
Default memberwise assignment
type casting (conversion)
35. The stream extraction operator
type casting (conversion)
left
>>
if...else
36. A C++ statement that makes a decision is ______.
inheritance
binary operator
if
identifiers
37. A filestream variable that represents the default output device
cout
initialized
Preprocessor
before
38. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
endl (same as 'n')
preprocessor
local variable
39. Initializers __________ must be used to initialize constant members of a class.
operand value
member
address
Closing brace
40. An operator that can only be used with int values. result will always be an int.
default constructor
scope resolution operator
% modulus
type casting (conversion)
41. All ______ must be declared before they are used.
srand
address
variables
non-static
42. Message displayed to the screen asking user for input; generated with an output statement
base
escape sequences
strcpy()
prompt
43. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
ofstream
object file
return
globals
44. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
integer operands
local variable
if
45. The elements of an array are related by the fact that they have the same name and ___________.
inline functions
Literals
cmath
type
46. A type of pointer that can point at objects of any data type.
left
void pointer
initialized
variable
47. A pointer is a variable that contains as its value the____________ of another variable.
mixed expression
address
allocating memory
type coercion
48. Executable version of program
object file
main
loader
two-dimensional
49. A variable that is known only within the function in which it is defined is called a ________.
?
function parameters
break
local variable
50. The sign you use for pointers
reserve words
{ }
*
left