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. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
semicolon
classes
unary scope resolution operator (::)
searching
2. Most calculations are normally performed by ______ statements.
inline functions
beginning
assignment
assignment statement
3. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
operator overloading
rand
case sensitive
static
4. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
unary scope resolution operator (::)
template
Literals
5. This is used to mark the end of a complete C++ programming statement.
reserved words
register
object file
Semicolon
6. A human readable file that contains C++ program
Preprocessor
source file
variable
assignment
7. Executable version of program
reserve words
a.out
object file
0
8. To write data to a file you define an object of which one of the following
before
friend
virtual functions
ofstream
9. Used for dynamically allocated variables
heap
main
subscript (or index)
Counter-controlled or definite
10. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
Arithmetic Operators
initialized
cin
11. = & | are examples of ____________.
friend
special symbols
new line
operator overloading
12. Grammar rules of the language; compiler will try to identify and locate syntax errors
token
default constructor
loader
syntax
13. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
unary scope resolution operator (::)
Preprocessor
selection
srand
14. A function ________ enables a single function to be defined to perform a task on many different data types.
template
auto
.cpp
Counter-controlled or definite
15. The only integer that can be assigned directly to a pointer is_____________.
Unified Modeling Language(UML)
type coercion
strcpy()
0
16. A filestream variable that represents the default input source
0
?
cin
*
17. directive A statement that starts with a # is called a ____________.
unary scope resolution operator (::)
arithmetic expression
Preprocessor
const
18. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
recursive function
object-oriented analysis and design (OOAD)
friend
19. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
public
private
dot (.)
20. 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
non-static
base
unary operator
cin
21. Header file that contains commonly performed mathematical functions
scope resolution operator
Default memberwise assignment
return
cmath
22. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
Default memberwise assignment
showpoint
Stack overflow
23. If a member initializer is not provided for a member object of a class the object's __________ is called.
.cpp
default constructor
escape sequences
Semicolon
24. Names of things that are used in a program - can apply to variables & constants and functions
dot (.)
identifiers
::
continue
25. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
sorting
recursive function
const
scope resolution operator
26. Forces the computer to display decimal point and trailing zeroes
base
vectors
const
showpoint
27. The storage-class specifiers are mutable - auto - ________ - extern and static.
NULL
inheritance
register
type
28. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
<<
/n
friend
if
29. A member function should be declared static if it does not access __________ class members.
NULL
special symbols
non-static
reserved words
30. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
#include
n
this
function scope
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
Unified Modeling Language(UML)
NULL
selection
operator overloading
32. A constant object must be __________; it cannot be modified after it is created.
static
base class
#include
initialized
33. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
if...else
cin >> variable
identifiers
address
34. The size & shape & color and weight of an object are considered
getline
attributes
#include
syntax
35. A set of values together with a set of operations
globals
Literals
Default memberwise assignment
data type
36. Every C++ statement ends with a(n) _________.
strcpy()
int values
semicolon
public
37. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
#include <headerfilename>
{ }
fixed
#include
38. The ________ enables access to a global variable with the same name as a variable in the current scope.
Closing brace
#include
semantics
unary scope resolution operator (::)
39. Words that are used for special purposes in a program
associations
reserved words
syntax
floating-point
40. Classes can have relationships with other classes. These relationships are called ________.
object file
constant variable
associations
non-static
41. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
object-oriented analysis and design (OOAD)
function prototype
<<
preprocessor
42. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
named constant
left
floating-point
function overloading
43. Allows the programmer to store a value in a variable
assignment statement
selection
object file
<<
44. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
Arithmetic Operators
static
syntax
global
45. 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.
vectors
NULL
information hiding
preprocessor
46. Returns the length of a string excluding the null terminator.
assignment
int values
strlen()
unary operator
47. Preprocessor directive syntax
main
token
access specifier
#include <headerfilename>
48. Creates a copy of a string.
identifiers
strcpy()
delete
new line
49. All ______ must be declared before they are used.
selection
Counter-controlled or definite
const
variables
50. The symbol for the binary scope resolution operator
fixed
prompt
beginning
::