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. A member function should be declared static if it does not access __________ class members.
Counter-controlled or definite
preprocessor
non-static
base
2. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
3. A program that finds and attaches to your program the indicated libraries for compilation
before
preprocessor
operator
return
4. Lists and tables of values can be stored in arrays or __________.
function overloading
floating-point
vectors
base
5. 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.
pointer
local variable
n
continue
6. Used for function calls and local variables
void
searching
stack
unary operator
7. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Preprocessor
semantics
function call
named constant
8. Message displayed to the screen asking user for input; generated with an output statement
t
prompt
unary operator
Closing brace
9. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
floating-point
classes
break
template
10. A function that can be used to read character data including whitespace
NULL
classes
cin.get(ch)
function call
11. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Semicolon
Unified Modeling Language(UML)
unary scope resolution operator (::)
syntax
12. 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.
token
::
break
dot (.)
13. A variable that holds the address of another variable.
pointer
subscript (or index)
default constructor
/n
14. The process of analyzing and designing a system from an object-oriented point of view is called ________.
like-type expression
srand
new line
object-oriented analysis and design (OOAD)
15. A variable that is known only within the function in which it is defined is called a ________.
local variable
special symbols
static
Preprocessor
16. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
stack
*
scope resolution operator
17. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
Arithmetic Operators
return
function scope
delete
18. The stream insertion operator
Default memberwise assignment
floating-point
<<
a.out
19. 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.
named constant
return
case sensitive
Sentinel
20. The sign you use for pointers
this
*
reserve words
preprocessor
21. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
pointer
Literals
?
22. The _____ causes the contents of another file to be inserted into a program.
#include directive
Semicolon
cin.get(ch)
register
23. The elements of an array are related by the fact that they have the same name and ___________.
recursive
type
delete
special symbols
24. An operator that can only be used with int values. result will always be an int.
% modulus
pointer
whitespace
object-oriented analysis and design (OOAD)
25. A filestream variable that represents the default output device
{ }
recursive function
cout
binary operator
26. Naming convention for C++ programs
scope resolution operator
source file
switch
.cpp
27. Grammar rules of the language; compiler will try to identify and locate syntax errors
global
function parameters
linker
syntax
28. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
return
information hiding
associations
29. An expression in which all operands have the same data type - result will have the same data type as operands
Arithmetic Operators
allocating memory
like-type expression
void
30. A human readable file that contains C++ program
?
void
base class
source file
31. * / % + -
attributes
Arithmetic Operators
special symbols
data type
32. Symbol that denotes an action to be performed
strlen()
operator
comments
static
33. A type of pointer that can point at objects of any data type.
Preprocessor
recursive function
void pointer
return
34. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
type casting (conversion)
void pointer
operator
35. If a member initializer is not provided for a member object of a class the object's __________ is called.
continue
recursive
endl (same as 'n')
default constructor
36. An expression that has operands with different data types
default constructor
pointer
mixed expression
n
37. The sign you use for references
function overloading
Sentinel
&
void pointer
38. Header file that contains commonly performed mathematical functions
information hiding
case sensitive
friend
cmath
39. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
variables
function overloading
#include <headerfilename>
definition
40. tab
scope
function overloading
t
beginning
41. Program components in C++ are called functions and ________.
Counter-controlled or definite
source file
>>
classes
42. The symbol for the binary scope resolution operator
member
rand
::
initialized
43. A memory location with a name and data type - its content may be changed during program execution
variable
function overloading
Sentinel
assignment statement
44. Class members specified as _________ are accessible anywhere an object of the class is in scope.
{ }
prompt
public
register
45. Forces the computer to display decimal point and trailing zeroes
recursive function
cin.get(ch)
.cpp
showpoint
46. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
loader
integer operands
special symbols
token
47. A function that calls itself
arithmetic expression
recursive function
const
strlen()
48. Use 2 characters to represent one
Literals
strcpy()
escape sequences
rand
49. Operator with only one operand
static
linker
unary operator
operand value
50. Every C++ statement ends with a(n) _________.
main
selection
const
semicolon