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. Classes can have relationships with other classes. These relationships are called ________.
preprocessor
associations
pointer
strcpy()
2. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
template
new line
private
derived class
3. Syntax for named constant declaration
const datatype identifier = value
constant variable
0
&
4. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
Preprocessor
<<
ofstream
if...else
5. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
Default memberwise assignment
recursive
char
t
6. This manipulator is used to establish a field width for the value immediately following it.
setw
unary operator
token
cout
7. The stream insertion operator
recursive
<<
0
data type
8. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
0
overloading
n
ofstream
9. Operator with two operands
binary operator
.cpp
0
variables
10. Initializers __________ must be used to initialize constant members of a class.
access specifier
strcpy()
#include directive
member
11. For every opening brace in a C++ program there must be a ______________.
Closing brace
preprocessor
information hiding
char
12. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
pointer
pointer
object file
function prototype
13. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
loader
inline functions
comments
14. Symbol that denotes an action to be performed
operator
data type
0
syntax
15. The _____ causes the contents of another file to be inserted into a program.
operator
#include directive
reserved words
fstream
16. Characters used to separate symbols or reserved words or identifiers and statements
<<
const datatype identifier = value
whitespace
switch
17. C++ programs are normally typed into a computer using a(n) ________ program.
Unified Modeling Language(UML)
editor
char
assignment
18. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
member
*
scope
19. 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.
constant variable
void
globals
local variable
20. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
register
dot (.)
const
21. The process of analyzing and designing a system from an object-oriented point of view is called ________.
prompt
linker
object-oriented analysis and design (OOAD)
fixed
22. A pointer is a variable that contains as its value the____________ of another variable.
reserve words
address
pointer
type casting (conversion)
23. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
variable
operand value
semantics
unary scope resolution operator (::)
24. This manipulator causes the field to be left-justified with padding spaces printed to the right.
scope resolution operator
left
Literals
public
25. Sets floating-point values to a fixed decimal format
{ }
register
fixed
token
26. Associate an identifier with a memory location
named constant
allocating memory
srand
assignment statement
27. 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.
return
Arithmetic Operators
dot (.)
case sensitive
28. 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.
preprocessor
continue
function scope
searching
29. The process of placing the elements of an array in order is called ________ the array.
sorting
register
dot (.)
const
30. You must have a ___________ for every variable you intend to use in a program
void
cin.get(ch)
definition
>>
31. int namespace include using return examples of ___________
unary scope resolution operator (::)
access specifier
reserve words
>>
32. Preprocessor directive syntax
member
#include <headerfilename>
void pointer
register
33. A sequence of operands and operators that describe a calculation to be performed
private
before
source file
arithmetic expression
34. A __________ should be used to declare the size of an array because it makes the program more scalable.
&
constant variable
associations
cmath
35. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
opened
//
switch
?
36. 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
base
Stack overflow
showpoint
% modulus
37. A member function should be declared static if it does not access __________ class members.
mixed expression
assignment statement
non-static
Semicolon
38. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
#include <headerfilename>
this
reserve words
Arithmetic Operators
39. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
like-type expression
scope resolution operator
setw
40. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
strcpy()
char
Stack overflow
type casting (conversion)
41. The process of determining if an array contains a particular key value is called _________ the array.
scope
searching
scope resolution operator
sorting
42. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
const
local variable
Unified Modeling Language(UML)
43. Every C++ statement ends with a(n) _________.
t
recursive function
strlen()
semicolon
44. Member objects are constructed __________ their enclosing class object.
strcmp()
token
before
identifiers
45. The stream extraction operator
/n
friend
template
>>
46. * / % + -
data type
Arithmetic Operators
assignment
return
47. A file must be ________ before data can be written to or read from it.
data type
opened
const
function overloading
48. This is used to mark the end of a complete C++ programming statement.
prompt
Semicolon
unary scope resolution operator (::)
constant variable
49. A function that can be used to read character data including whitespace
function parameters
t
cin.get(ch)
.cpp
50. The elements of an array are related by the fact that they have the same name and ___________.
information hiding
recursive function
type
dot (.)