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. Type casting syntax
fstream
data type
definition
static_cast<char>(65)
2. The stream extraction operator
default constructor
type
friend
>>
3. To allow file access in a program you must #include this header file.
attributes
new line
char
fstream
4. The size & shape & color and weight of an object are considered
Unified Modeling Language(UML)
attributes
selection
data type
5. The _____ causes the contents of another file to be inserted into a program.
dot (.)
token
preprocessor
#include directive
6. * / % + -
public
a.out
reserve words
Arithmetic Operators
7. The process of placing the elements of an array in order is called ________ the array.
0
opened
sorting
Counter-controlled or definite
8. A pointer is a variable that contains as its value the____________ of another variable.
Literals
binary operator
fixed
address
9. 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.
linker
syntax
static
/n
10. A type of pointer that can point at objects of any data type.
vectors
void pointer
syntax
t
11. A file must be ________ before data can be written to or read from it.
opened
address
Closing brace
like-type expression
12. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
strcpy()
derived class
sorting
cin >> variable
13. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
opened
Stack overflow
function parameters
14. = & | are examples of ____________.
Stack overflow
global
special symbols
this
15. All ______ must be declared before they are used.
information hiding
preprocessor
variables
#include
16. A __________ data member represents class-wide information.
escape sequences
ofstream
static
local variable
17. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
inline functions
rand
recursive
?
18. int namespace include using return examples of ___________
>>
pointer
.cpp
reserve words
19. The process of determining if an array contains a particular key value is called _________ the array.
register
searching
Literals
<<
20. Used for function calls and local variables
NULL
endl (same as 'n')
polymorphism
stack
21. A C++ statement that makes a decision is ______.
if
access specifier
Preprocessor
function parameters
22. A set of values together with a set of operations
break
Sentinel
data type
heap
23. The ________ statement in a called function passes the value of an expression back to the calling function.
heap
char
vectors
return
24. This manipulator is used to establish a field width for the value immediately following it.
virtual functions
void
setw
if...else
25. The ________ qualifier is used to declare read-only variables.
#include directive
if...else
access specifier
const
26. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
pointer
cmath
showpoint
27. A function is invoked with a ________.
type casting (conversion)
syntax
function call
classes
28. The number used to refer to a particular element of an array is called its ________.
>>
subscript (or index)
if
cmath
29. data types that refer to numbers with decimals
&
floating-point
>>
cout
30. The sign you use for pointers
static
polymorphism
*
heap
31. If a member initializer is not provided for a member object of a class the object's __________ is called.
member
return
Default memberwise assignment
default constructor
32. Preprocessor directive syntax
editor
delete
unary operator
#include <headerfilename>
33. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
reserved words
switch
strlen()
object file
34. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
a.out
scope
linker
new line
35. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
pointer
Sentinel
heap
operator
36. You can declare default values for a function in the ____________________.
identifiers
.cpp
function parameters
source file
37. Whole numbers - no decimals and no commas included
continue
function overloading
subscript (or index)
int values
38. 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
fixed
.cpp
if...else
39. 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.
whitespace
static
variables
continue
40. The address-of operator. it is used to assign pointers and to print the address of variables.
&
operator overloading
const
base
41. The ________ of an identifier is the portion of the program in which the identifier can be used.
?
inheritance
information hiding
scope
42. tab
unary scope resolution operator (::)
Semicolon
t
return
43. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
function scope
classes
before
NULL
44. Class members specified as _________ are accessible anywhere an object of the class is in scope.
const
non-static
associations
public
45. Words that are used for special purposes in a program
base
reserved words
#include directive
inheritance
46. The _________ begins the body of every function and the _________ ends the body of every function.
static_cast<char>(65)
{ }
strlen()
cin >> variable
47. Classes can have relationships with other classes. These relationships are called ________.
char
associations
pointer
recursive function
48. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
Literals
register
fstream
Semicolon
49. The sign you use for references
&
a.out
constant variable
ofstream
50. The ________ enables access to a global variable with the same name as a variable in the current scope.
source file
definition
register
unary scope resolution operator (::)