SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
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. Most calculations are normally performed by ______ statements.
friend
recursive function
binary operator
assignment
2. A function that calls itself
scope resolution operator
recursive function
floating-point
data type
3. int namespace include using return examples of ___________
if...else
reserve words
% modulus
getline
4. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
mixed expression
beginning
cmath
semantics
5. Names of things that are used in a program - can apply to variables & constants and functions
attributes
before
% modulus
identifiers
6. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
loader
pointer
operand value
?
7. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
register
static
char
setw
8. 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.
?
semantics
return
base
9. A set of values together with a set of operations
scope
data type
Stack overflow
member
10. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
return
Sentinel
inline functions
recursive function
11. A C++ statement that makes a decision is ______.
if
function call
void
this
12. A constant object must be __________; it cannot be modified after it is created.
delete
main
initialized
dot (.)
13. A variable declared outside any block or function is a ________ variable.
//
unary operator
global
attributes
14. A function is invoked with a ________.
register
variables
function call
continue
15. The process of determining if an array contains a particular key value is called _________ the array.
searching
Closing brace
cmath
base
16. The ________ program transfers the executable image of a C++ program from disk to memory.
rand
strcpy()
auto
loader
17. Allows the programmer to store a value in a variable
assignment statement
showpoint
#include <headerfilename>
initialized
18. = & | are examples of ____________.
>>
function parameters
special symbols
vectors
19. In inheritance the ____________ is the class that supplies the inherited members.
a.out
cin
base class
strlen()
20. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
Unified Modeling Language(UML)
searching
new line
classes
21. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
constant variable
identifiers
base
22. This is used to mark the end of a complete C++ programming statement.
const datatype identifier = value
virtual functions
named constant
Semicolon
23. The _________ begins the body of every function and the _________ ends the body of every function.
>>
operator overloading
{ }
dot (.)
24. C++ programs are normally typed into a computer using a(n) ________ program.
editor
register
binary operator
public
25. Sets floating-point values to a fixed decimal format
constant variable
friend
fixed
showpoint
26. The elements of an array are related by the fact that they have the same name and ___________.
type
type casting (conversion)
this
getline
27. You must have a ___________ for every variable you intend to use in a program
/n
variable
variables
definition
28. Member objects are constructed __________ their enclosing class object.
before
getline
source file
Closing brace
29. data types that refer to numbers with decimals
derived class
floating-point
::
void
30. A function that can be used to read character data including whitespace
Stack overflow
main
cin.get(ch)
address
31. Identifier or expression that is part of the calculation to be performed
comments
return
like-type expression
operand value
32. Function ________ is used to produce random numbers.
new line
global
dot (.)
rand
33. Header file that contains commonly performed mathematical functions
cmath
preprocessor
scope resolution operator
NULL
34. Characters used to separate symbols or reserved words or identifiers and statements
two-dimensional
whitespace
return
const
35. An array that uses two subscripts is referred to as a(n) _________ array.
definition
member
two-dimensional
data type
36. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
floating-point
object-oriented analysis and design (OOAD)
named constant
endl (same as 'n')
37. A ________ program executes before the compiler's translation phase begins.
function prototype
const
preprocessor
/n
38. __________ can be used to assign an object of a class to another object of the same class.
fstream
virtual functions
register
Default memberwise assignment
39. 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.
friend
operator
dot (.)
loader
40. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
Unified Modeling Language(UML)
#include
static
new line
41. Classes can have relationships with other classes. These relationships are called ________.
rand
associations
non-static
strcpy()
42. A sequence of operands and operators that describe a calculation to be performed
default constructor
before
arithmetic expression
variables
43. Forces the computer to display decimal point and trailing zeroes
showpoint
comments
endl (same as 'n')
global
44. An operator that can only be used with int values. result will always be an int.
register
binary operator
function prototype
% modulus
45. Executable version of program
default constructor
object file
showpoint
integer operands
46. The _____ causes the contents of another file to be inserted into a program.
address
scope resolution operator
void pointer
#include directive
47. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
escape sequences
const
Literals
48. An expression that has operands with different data types
mixed expression
setw
address
fixed
49. Two slash marks ( // ) indicate __________ of a comment
pointer
function call
beginning
scope
50. Returns the length of a string excluding the null terminator.
special symbols
strlen()
searching
<<