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. Syntax for named constant declaration
floating-point
whitespace
&
const datatype identifier = value
2. A filestream variable that represents the default input source
preprocessor
cin
integer operands
srand
3. Naming convention for C++ programs
char
.cpp
static
type
4. A type of pointer that can point at objects of any data type.
local variable
void pointer
register
Sentinel
5. You can declare default values for a function in the ____________________.
before
recursive function
strcpy()
function parameters
6. = & | are examples of ____________.
special symbols
register
linker
searching
7. The idea that you can call the same function and the output will depend on the type of object you're using.
function overloading
polymorphism
vectors
operator
8. A function ________ enables a single function to be defined to perform a task on many different data types.
cin >> variable
template
return
global
9. 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.
&
information hiding
allocating memory
token
10. An expression that has operands with different data types
mixed expression
base
assignment statement
char
11. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
cin
{ }
heap
friend
12. Use 2 characters to represent one
reserve words
static_cast<char>(65)
void pointer
escape sequences
13. A filestream variable that represents the default output device
mixed expression
void
cout
showpoint
14. Function ________ is used to produce random numbers.
rand
preprocessor
function parameters
const datatype identifier = value
15. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
Arithmetic Operators
semicolon
if
16. Used for dynamically allocated variables
friend
heap
arithmetic expression
function prototype
17. Type casting syntax
return
access specifier
static_cast<char>(65)
left
18. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
#include directive
private
function overloading
derived class
19. The stream insertion operator
<<
showpoint
editor
rand
20. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
static
return
static
private
21. A function that calls itself
inline functions
recursive function
operator overloading
arithmetic expression
22. The process of analyzing and designing a system from an object-oriented point of view is called ________.
syntax
Sentinel
stack
object-oriented analysis and design (OOAD)
23. Preprocessor directive syntax
#include <headerfilename>
inheritance
register
allocating memory
24. Repeating a set of instructions a specific number of times is called_________repetition.
operator
constant variable
Counter-controlled or definite
prompt
25. Identifier or expression that is part of the calculation to be performed
>>
auto
public
operand value
26. The ________ qualifier is used to declare read-only variables.
const
cout
n
<<
27. Initializers __________ must be used to initialize constant members of a class.
type casting (conversion)
void pointer
object-oriented analysis and design (OOAD)
member
28. The elements of an array are related by the fact that they have the same name and ___________.
&
type
continue
global
29. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
stack
if
classes
?
30. The number used to refer to a particular element of an array is called its ________.
Unified Modeling Language(UML)
default constructor
function call
subscript (or index)
31. Program components in C++ are called functions and ________.
unary operator
//
classes
attributes
32. Compares two strings and returns 0 if they are equal.
reserve words
<<
variable
strcmp()
33. A pointer is a variable that contains as its value the____________ of another variable.
Preprocessor
strcmp()
#include <headerfilename>
address
34. An operator that can only be used with int values. result will always be an int.
Sentinel
static
% modulus
register
35. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
editor
stack
operator overloading
#include <headerfilename>
36. The ________ enables access to a global variable with the same name as a variable in the current scope.
stack
Default memberwise assignment
data type
unary scope resolution operator (::)
37. __________ can be used to assign an object of a class to another object of the same class.
if
Literals
Default memberwise assignment
cin
38. Names of things that are used in a program - can apply to variables & constants and functions
if...else
Sentinel
definition
identifiers
39. A program that finds and attaches to your program the indicated libraries for compilation
arithmetic expression
editor
identifiers
preprocessor
40. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
token
searching
void
static
41. Two slash marks ( // ) indicate __________ of a comment
beginning
{ }
object file
editor
42. Message displayed to the screen asking user for input; generated with an output statement
inheritance
operator overloading
cmath
prompt
43. 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.
information hiding
/n
setw
stack
44. You must have a ___________ for every variable you intend to use in a program
non-static
opened
definition
like-type expression
45. The stream extraction operator
derived class
>>
Unified Modeling Language(UML)
return
46. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
47. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
preprocessor
getline
dot (.)
cin >> variable
48. Every C++ program begins execution at the function _________.
access specifier
main
case sensitive
Arithmetic Operators
49. The ________ program transfers the executable image of a C++ program from disk to memory.
data type
cin.get(ch)
Unified Modeling Language(UML)
loader
50. The address-of operator. it is used to assign pointers and to print the address of variables.
strcmp()
t
&
variable