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. The stream extraction operator
Literals
setw
>>
return
2. In inheritance the ____________ is the class the receives the inherited members.
function parameters
Default memberwise assignment
pointer
derived class
3. The elements of an array are related by the fact that they have the same name and ___________.
preprocessor
new line
type
recursive function
4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
Stack overflow
Closing brace
void pointer
5. A function is invoked with a ________.
Arithmetic Operators
stack
function call
special symbols
6. The address-of operator. it is used to assign pointers and to print the address of variables.
&
/n
preprocessor
base class
7. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
variables
this
classes
overloading
8. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
allocating memory
assignment
inheritance
member
9. A recursive function typically has two components: One that provides a means for the recursion to terminate by testing for a(n) ________ case and one that expresses the problem as a recursive call for a slightly simpler problem than the original call
function overloading
this
0
base
10. The only integer that can be assigned directly to a pointer is_____________.
recursive function
0
static
preprocessor
11. Used to qualify hidden names so that they can be used.
Stack overflow
arithmetic expression
recursive
scope resolution operator
12. Class members specified as _________ are accessible anywhere an object of the class is in scope.
#include <headerfilename>
public
friend
static
13. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
before
identifiers
default constructor
14. Grammar rules of the language; compiler will try to identify and locate syntax errors
local variable
syntax
<<
virtual functions
15. Keyword public is a(n) _________
private
initialized
int values
access specifier
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 ________.
a.out
object-oriented analysis and design (OOAD)
overloading
allocating memory
17. int namespace include using return examples of ___________
attributes
reserve words
before
non-static
18. A function that calls itself
reserved words
>>
switch
recursive function
19. directive A statement that starts with a # is called a ____________.
{ }
Preprocessor
derived class
void pointer
20. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
semantics
register
<<
function call
21. Every C++ program begins execution at the function _________.
friend
srand
main
default constructor
22. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
like-type expression
void
private
Unified Modeling Language(UML)
23. To allow file access in a program you must #include this header file.
comments
fstream
unary scope resolution operator (::)
beginning
24. The _________ begins the body of every function and the _________ ends the body of every function.
static
void
sorting
{ }
25. Type casting syntax
two-dimensional
//
pointer
static_cast<char>(65)
26. An expression that has operands with different data types
assignment
mixed expression
Preprocessor
comments
27. Program components in C++ are called functions and ________.
cin.get(ch)
classes
global
private
28. A member function should be declared static if it does not access __________ class members.
#include <headerfilename>
/n
non-static
object-oriented analysis and design (OOAD)
29. You must have a ___________ for every variable you intend to use in a program
definition
local variable
break
loader
30. Allows the programmer to store a value in a variable
Literals
whitespace
assignment statement
char
31. A pointer is a variable that contains as its value the____________ of another variable.
access specifier
address
getline
char
32. A file must be ________ before data can be written to or read from it.
heap
assignment statement
opened
&
33. Classes can have relationships with other classes. These relationships are called ________.
strcmp()
srand
associations
semantics
34. Header file that contains commonly performed mathematical functions
integer operands
cmath
arithmetic expression
object-oriented analysis and design (OOAD)
35. * / % + -
two-dimensional
const
pointer
Arithmetic Operators
36. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
local variable
new line
Stack overflow
prompt
37. A constant object must be __________; it cannot be modified after it is created.
heap
Unified Modeling Language(UML)
initialized
function parameters
38. The storage-class specifiers are mutable - auto - ________ - extern and static.
searching
register
pointer
strcpy()
39. An expression in which all operands have the same data type - result will have the same data type as operands
definition
Counter-controlled or definite
scope resolution operator
like-type expression
40. Function ________ is used to set the random number seed to randomize a program.
initialized
like-type expression
srand
main
41. This manipulator causes the field to be left-justified with padding spaces printed to the right.
fstream
left
return
ofstream
42. The process of determining if an array contains a particular key value is called _________ the array.
integer operands
cin
&
searching
43. Two slash marks ( // ) indicate __________ of a comment
arithmetic expression
variables
::
beginning
44. The _____ causes the contents of another file to be inserted into a program.
cin >> variable
#include directive
editor
heap
45. The stream insertion operator
variables
<<
#include <headerfilename>
Unified Modeling Language(UML)
46. Lists and tables of values can be stored in arrays or __________.
data type
type coercion
vectors
two-dimensional
47. A program that finds and attaches to your program the indicated libraries for compilation
operator
type
derived class
preprocessor
48. 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
classes
>>
linker
49. Member objects are constructed __________ their enclosing class object.
base
before
overloading
loader
50. The ________ qualifier is used to declare read-only variables.
cmath
>>
inline functions
const