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. The idea that you can call the same function and the output will depend on the type of object you're using.
beginning
polymorphism
source file
overloading
2. The stream insertion operator
0
<<
recursive
escape sequences
3. Classes can have relationships with other classes. These relationships are called ________.
::
associations
NULL
strcpy()
4. Type casting syntax
sorting
attributes
static_cast<char>(65)
getline
5. The _____ causes the contents of another file to be inserted into a program.
#include directive
n
>>
preprocessor
6. C++ programs are normally typed into a computer using a(n) ________ program.
function scope
Counter-controlled or definite
register
editor
7. The stream extraction operator
>>
like-type expression
arithmetic expression
function prototype
8. When a value of one data type is implicitly (automatically) changed to another data type
heap
type coercion
scope resolution operator
linker
9. Creates a copy of a string.
cmath
prompt
strcpy()
Arithmetic Operators
10. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
a.out
return
continue
escape sequences
11. This manipulator causes the field to be left-justified with padding spaces printed to the right.
::
base class
polymorphism
left
12. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
object file
opened
this
assignment
13. The keyword ________ is used in a function header to indicate that a function does not return a value or to indicate that a function contains no parameters.
break
left
void
reserved words
14. A human readable file that contains C++ program
source file
char
opened
continue
15. A function that can be used to read character data including whitespace
editor
beginning
virtual functions
cin.get(ch)
16. The sign you use for pointers
Counter-controlled or definite
*
two-dimensional
inline functions
17. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
source file
const
inheritance
strcpy()
18. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
?
selection
scope
semantics
19. Compares two strings and returns 0 if they are equal.
before
showpoint
//
strcmp()
20. This manipulator is used to establish a field width for the value immediately following it.
switch
cin.get(ch)
constant variable
setw
21. The ________ program combines the output of the compiler with various library functions to produce an executable image.
function prototype
local variable
static_cast<char>(65)
linker
22. Identifier or expression that is part of the calculation to be performed
operand value
?
::
beginning
23. The sign you use for references
&
object-oriented analysis and design (OOAD)
if...else
t
24. Header file that contains commonly performed mathematical functions
cmath
function prototype
binary operator
attributes
25. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
endl (same as 'n')
return
prompt
26. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
stack
getline
{ }
27. 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.
Default memberwise assignment
unary operator
information hiding
main
28. Used to qualify hidden names so that they can be used.
scope resolution operator
static
cin
>>
29. Preprocessor directive syntax
#include <headerfilename>
subscript (or index)
Stack overflow
information hiding
30. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
::
void
const
31. Manipulator that causes the insertion point (cursor) to move to the beginning of the next line
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
32. A file must be ________ before data can be written to or read from it.
opened
ofstream
operand value
source file
33. Grammar rules of the language; compiler will try to identify and locate syntax errors
syntax
before
strcmp()
editor
34. A C++ statement that makes a decision is ______.
if
classes
vectors
subscript (or index)
35. A constant object must be __________; it cannot be modified after it is created.
associations
classes
before
initialized
36. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
cout
local variable
pointer
37. * / % + -
if...else
function parameters
Arithmetic Operators
pointer
38. The ________ qualifier is used to declare read-only variables.
Stack overflow
case sensitive
initialized
const
39. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
function call
whitespace
token
overloading
40. To write data to a file you define an object of which one of the following
srand
strlen()
ofstream
scope
41. 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.
continue
token
opened
>>
42. All C++ Variables are_________.
virtual functions
sorting
case sensitive
polymorphism
43. The address-of operator. it is used to assign pointers and to print the address of variables.
&
Stack overflow
function overloading
endl (same as 'n')
44. directive A statement that starts with a # is called a ____________.
Preprocessor
type
function call
>>
45. Words that are used for special purposes in a program
*
named constant
unary scope resolution operator (::)
reserved words
46. Class members specified as _________ are accessible anywhere an object of the class is in scope.
attributes
friend
definition
public
47. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
*
.cpp
virtual functions
dot (.)
48. An expression in which all operands have the same data type - result will have the same data type as operands
recursive function
public
like-type expression
semicolon
49. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
break
constant variable
int values
pointer
50. All ______ must be declared before they are used.
variables
static
token
attributes