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. Message displayed to the screen asking user for input; generated with an output statement
preprocessor
Stack overflow
prompt
function parameters
2. Creates a copy of a string.
comments
strcpy()
assignment
like-type expression
3. A filestream variable that represents the default input source
cin
public
whitespace
strcmp()
4. Operator with only one operand
Literals
mixed expression
*
unary operator
5. Type casting syntax
recursive function
static_cast<char>(65)
whitespace
void
6. Two slash marks ( // ) indicate __________ of a comment
function prototype
beginning
prompt
Arithmetic Operators
7. The only integer that can be assigned directly to a pointer is_____________.
0
subscript (or index)
*
::
8. int namespace include using return examples of ___________
address
static
strcpy()
reserve words
9. Repeating a set of instructions a specific number of times is called_________repetition.
Counter-controlled or definite
cmath
reserve words
public
10. This manipulator is used to establish a field width for the value immediately following it.
public
linker
identifiers
setw
11. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
void
variables
cmath
12. The address-of operator. it is used to assign pointers and to print the address of variables.
classes
pointer
assignment statement
&
13. A memory location with a name and data type - its content may be changed during program execution
local variable
showpoint
variable
unary scope resolution operator (::)
14. Every C++ program begins execution at the function _________.
member
base
information hiding
main
15. 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.
?
#include <headerfilename>
reserve words
const
16. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
reserved words
cin >> variable
assignment statement
strcmp()
17. In inheritance the ____________ is the class that supplies the inherited members.
base class
dot (.)
address
char
18. A variable that holds the address of another variable.
register
variable
pointer
case sensitive
19. The ________ enables access to a global variable with the same name as a variable in the current scope.
unary scope resolution operator (::)
variables
#include <headerfilename>
type casting (conversion)
20. Initializers __________ must be used to initialize constant members of a class.
left
mixed expression
member
loader
21. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
allocating memory
virtual functions
classes
22. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
getline
register
operator overloading
if...else
23. Forces the computer to display decimal point and trailing zeroes
unary operator
showpoint
a.out
#include directive
24. To write data to a file you define an object of which one of the following
static_cast<char>(65)
0
showpoint
ofstream
25. The process of analyzing and designing a system from an object-oriented point of view is called ________.
static
unary operator
recursive function
object-oriented analysis and design (OOAD)
26. The modulus operator (%) can be used only with __________.
function parameters
integer operands
function scope
const
27. An array that uses two subscripts is referred to as a(n) _________ array.
mixed expression
char
two-dimensional
endl (same as 'n')
28. The sign you use for pointers
definition
*
::
#include directive
29. 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
const datatype identifier = value
default constructor
//
base
30. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
new line
subscript (or index)
function parameters
31. To explicitly indicate that a value is to be converted to another type
beginning
linker
type casting (conversion)
Arithmetic Operators
32. A function ________ enables a single function to be defined to perform a task on many different data types.
template
whitespace
Default memberwise assignment
preprocessor
33. In inheritance the ____________ is the class the receives the inherited members.
derived class
reserved words
arithmetic expression
{ }
34. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
void
&
unary scope resolution operator (::)
globals
35. Compares two strings and returns 0 if they are equal.
static_cast<char>(65)
access specifier
showpoint
strcmp()
36. The _____ causes the contents of another file to be inserted into a program.
prompt
scope
#include directive
recursive function
37. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
pointer
initialized
associations
classes
38. Associate an identifier with a memory location
operator
allocating memory
srand
type
39. A member function should be declared static if it does not access __________ class members.
void
non-static
attributes
object file
40. Used to qualify hidden names so that they can be used.
variable
scope resolution operator
definition
type casting (conversion)
41. You must have a ___________ for every variable you intend to use in a program
definition
classes
switch
dot (.)
42. A variable that is known only within the function in which it is defined is called a ________.
Stack overflow
void pointer
local variable
recursive
43. A function that calls itself
information hiding
Unified Modeling Language(UML)
recursive function
semantics
44. The ________ qualifier is used to declare read-only variables.
Literals
#include <headerfilename>
const
virtual functions
45. The storage-class specifiers are mutable - auto - ________ - extern and static.
attributes
register
global
data type
46. Lists and tables of values can be stored in arrays or __________.
scope
vectors
definition
floating-point
47. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
floating-point
break
int values
#include
48. The symbol for the binary scope resolution operator
operand value
function parameters
::
function scope
49. A filestream variable that represents the default output device
preprocessor
cout
pointer
attributes
50. To allow file access in a program you must #include this header file.
globals
getline
fstream
return