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 symbol for the binary scope resolution operator
address
#include
::
left
2. Nonexecutable statements that are included in a program to provide information about what the program does etc.
comments
*
variable
cin
3. Two slash marks ( // ) indicate __________ of a comment
vectors
dot (.)
beginning
global
4. Function ________ is used to produce random numbers.
ofstream
base
syntax
rand
5. To write data to a file you define an object of which one of the following
overloading
ofstream
polymorphism
Default memberwise assignment
6. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
classes
showpoint
Sentinel
this
7. An array that uses two subscripts is referred to as a(n) _________ array.
constant variable
function prototype
two-dimensional
int values
8. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
comments
private
Sentinel
continue
9. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
reserve words
semantics
two-dimensional
escape sequences
10. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
#include <headerfilename>
continue
void
11. The idea that you can call the same function and the output will depend on the type of object you're using.
local variable
&
fixed
polymorphism
12. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
like-type expression
new line
stack
13. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
variable
#include
type casting (conversion)
function overloading
14. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
pointer
strcmp()
NULL
15. These are data items whose values do not change while the program is running
Literals
cout
identifiers
dot (.)
16. Syntax for named constant declaration
classes
const datatype identifier = value
type
Default memberwise assignment
17. The storage-class specifiers are mutable - auto - ________ - extern and static.
access specifier
source file
virtual functions
register
18. A function is invoked with a ________.
mixed expression
static
function call
access specifier
19. Words that are used for special purposes in a program
reserved words
local variable
stack
>>
20. C++ programs are normally typed into a computer using a(n) ________ program.
stack
cin.get(ch)
editor
static
21. Classes can have relationships with other classes. These relationships are called ________.
function overloading
loader
associations
variables
22. A variable declared outside any block or function is a ________ variable.
::
global
function overloading
new line
23. The ________ statement in a called function passes the value of an expression back to the calling function.
#include directive
public
rand
return
24. Sets floating-point values to a fixed decimal format
showpoint
fixed
Sentinel
a.out
25. Names of things that are used in a program - can apply to variables & constants and functions
opened
vectors
main
identifiers
26. A function that calls itself
cout
a.out
integer operands
recursive function
27. 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.
rand
assignment statement
#include <headerfilename>
continue
28. data types that refer to numbers with decimals
floating-point
base
source file
information hiding
29. Identifier or expression that is part of the calculation to be performed
mixed expression
operand value
const datatype identifier = value
>>
30. All ______ must be declared before they are used.
operand value
variables
getline
delete
31. Initializers __________ must be used to initialize constant members of a class.
member
semantics
operand value
object-oriented analysis and design (OOAD)
32. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
void
integer operands
base class
33. A memory location with a name and data type - its content may be changed during program execution
arithmetic expression
fstream
t
variable
34. You must have a ___________ for every variable you intend to use in a program
Semicolon
definition
non-static
recursive
35. Member objects are constructed __________ their enclosing class object.
new line
&
preprocessor
before
36. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
beginning
allocating memory
continue
static
37. All C++ Variables are_________.
case sensitive
>>
opened
const
38. Allows the programmer to store a value in a variable
unary operator
heap
inheritance
assignment statement
39. Class members specified as _________ are accessible anywhere an object of the class is in scope.
syntax
public
local variable
char
40. 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.
Semicolon
information hiding
static
address
41. Function ________ is used to set the random number seed to randomize a program.
prompt
escape sequences
srand
reserved words
42. The size & shape & color and weight of an object are considered
public
delete
object file
attributes
43. The ________ program combines the output of the compiler with various library functions to produce an executable image.
linker
initialized
heap
type coercion
44. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
left
friend
static_cast<char>(65)
45. Operator with two operands
initialized
opened
binary operator
void
46. The _________ begins the body of every function and the _________ ends the body of every function.
subscript (or index)
classes
switch
{ }
47. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
definition
if...else
cmath
floating-point
48. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
delete
non-static
friend
49. A variable that is known only within the function in which it is defined is called a ________.
Closing brace
function parameters
local variable
return
50. The elements of an array are related by the fact that they have the same name and ___________.
>>
private
type
ofstream