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. Nonexecutable statements that are included in a program to provide information about what the program does etc.
% modulus
cout
comments
const datatype identifier = value
2. 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.
?
assignment
subscript (or index)
switch
3. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
overloading
break
register
integer operands
4. The three values that can be used to initialize a pointer are 0 - __________ and an address.
case sensitive
preprocessor
NULL
inline functions
5. Function ________ is used to set the random number seed to randomize a program.
two-dimensional
object file
<<
srand
6. A member function should be declared static if it does not access __________ class members.
0
non-static
syntax
//
7. Allows the programmer to store a value in a variable
new line
associations
assignment statement
return
8. The stream extraction operator
int values
>>
linker
static
9. The address-of operator. it is used to assign pointers and to print the address of variables.
&
const datatype identifier = value
named constant
variable
10. A function that can be used to read character data including whitespace
pointer
cin.get(ch)
searching
assignment statement
11. 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
member
&
type
base
12. int namespace include using return examples of ___________
reserve words
type coercion
template
operand value
13. An expression that has operands with different data types
function prototype
reserve words
mixed expression
Stack overflow
14. The ________ program combines the output of the compiler with various library functions to produce an executable image.
return
variables
searching
linker
15. Used for function calls and local variables
new line
data type
stack
base class
16. A constant object must be __________; it cannot be modified after it is created.
virtual functions
#include directive
break
initialized
17. A function ________ enables a single function to be defined to perform a task on many different data types.
template
#include
main
stack
18. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
address
srand
setw
new line
19. This manipulator causes the field to be left-justified with padding spaces printed to the right.
two-dimensional
initialized
left
static_cast<char>(65)
20. Used to qualify hidden names so that they can be used.
fixed
address
scope resolution operator
initialized
21. A variable that is known only within the function in which it is defined is called a ________.
local variable
identifiers
delete
variables
22. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
type casting (conversion)
if...else
local variable
char
23. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
local variable
classes
Semicolon
semicolon
24. Executable version of program
like-type expression
switch
object file
syntax
25. The modulus operator (%) can be used only with __________.
two-dimensional
integer operands
base
preprocessor
26. Function ________ is used to produce random numbers.
rand
function overloading
assignment statement
static
27. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
inheritance
semantics
void
address
28. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
cin.get(ch)
if...else
Stack overflow
29. Classes can have relationships with other classes. These relationships are called ________.
const
associations
derived class
main
30. In inheritance the ____________ is the class the receives the inherited members.
a.out
switch
derived class
data type
31. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
data type
% modulus
globals
subscript (or index)
32. All C++ Variables are_________.
if
opened
case sensitive
strlen()
33. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
virtual functions
operator overloading
.cpp
break
34. Two slash marks ( // ) indicate __________ of a comment
beginning
base
integer operands
break
35. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
pointer
private
void
non-static
36. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
a.out
Unified Modeling Language(UML)
data type
auto
37. The ________ statement in a called function passes the value of an expression back to the calling function.
editor
return
const
strcpy()
38. Every C++ program begins execution at the function _________.
new line
main
pointer
syntax
39. = & | are examples of ____________.
friend
/n
special symbols
linker
40. The symbol for the binary scope resolution operator
scope resolution operator
% modulus
escape sequences
::
41. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
derived class
.cpp
Arithmetic Operators
function prototype
42. For every opening brace in a C++ program there must be a ______________.
reserve words
floating-point
Closing brace
data type
43. Header file that contains commonly performed mathematical functions
cmath
if
assignment
strcmp()
44. The _________ begins the body of every function and the _________ ends the body of every function.
opened
editor
{ }
named constant
45. The sign you use for pointers
*
arithmetic expression
srand
cout
46. Operator with only one operand
unary operator
//
access specifier
token
47. An expression in which all operands have the same data type - result will have the same data type as operands
linker
beginning
like-type expression
getline
48. Forces the computer to display decimal point and trailing zeroes
t
Sentinel
semicolon
showpoint
49. 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
subscript (or index)
cin.get(ch)
pointer
50. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
prompt
return
strcmp()