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. This manipulator is used to establish a field width for the value immediately following it.
setw
new line
::
const datatype identifier = value
2. Used to qualify hidden names so that they can be used.
scope resolution operator
recursive
integer operands
prompt
3. Member objects are constructed __________ their enclosing class object.
getline
case sensitive
syntax
before
4. Program components in C++ are called functions and ________.
?
classes
cin >> variable
escape sequences
5. The storage-class specifiers are mutable - auto - ________ - extern and static.
operator overloading
register
strcmp()
identifiers
6. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
initialized
return
Stack overflow
information hiding
7. 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.
selection
const
void
initialized
8. Class members specified as _________ are accessible anywhere an object of the class is in scope.
strcmp()
friend
public
if...else
9. = & | are examples of ____________.
Stack overflow
associations
special symbols
cin.get(ch)
10. Two slash marks ( // ) indicate __________ of a comment
beginning
virtual functions
global
::
11. Compares two strings and returns 0 if they are equal.
information hiding
preprocessor
if...else
strcmp()
12. Characters used to separate symbols or reserved words or identifiers and statements
t
whitespace
*
source file
13. A __________ should be used to declare the size of an array because it makes the program more scalable.
preprocessor
associations
constant variable
strcmp()
14. int namespace include using return examples of ___________
attributes
const
if
reserve words
15. Identifier or expression that is part of the calculation to be performed
polymorphism
non-static
default constructor
operand value
16. In inheritance the ____________ is the class the receives the inherited members.
stack
derived class
cmath
assignment
17. Executable version of program
object file
#include directive
classes
#include <headerfilename>
18. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
showpoint
getline
&
19. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
cin.get(ch)
type
cin >> variable
new line
20. Creates a copy of a string.
/n
Stack overflow
function scope
strcpy()
21. Symbol that denotes an action to be performed
operator
prompt
syntax
Sentinel
22. The ________ statement in a called function passes the value of an expression back to the calling function.
prompt
preprocessor
object file
return
23. The __________ operator reclaims memory previously allocated by new.
delete
variable
operator overloading
Literals
24. 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.
delete
type
static
type coercion
25. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
special symbols
derived class
private
{ }
26. 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.
integer operands
reserved words
continue
preprocessor
27. Most calculations are normally performed by ______ statements.
assignment
return
beginning
base
28. data types that refer to numbers with decimals
void
floating-point
case sensitive
definition
29. A program that finds and attaches to your program the indicated libraries for compilation
void pointer
preprocessor
type coercion
information hiding
30. The stream insertion operator
{ }
<<
rand
assignment statement
31. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
variables
#include directive
void
classes
32. The process of placing the elements of an array in order is called ________ the array.
friend
sorting
classes
strlen()
33. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
char
break
editor
a.out
34. Nonexecutable statements that are included in a program to provide information about what the program does etc.
function prototype
comments
definition
function overloading
35. Operator with two operands
Unified Modeling Language(UML)
access specifier
loader
binary operator
36. A variable that is known only within the function in which it is defined is called a ________.
public
local variable
unary operator
void
37. The idea that you can call the same function and the output will depend on the type of object you're using.
recursive function
cout
polymorphism
mixed expression
38. A human readable file that contains C++ program
object-oriented analysis and design (OOAD)
source file
assignment
Arithmetic Operators
39. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
Unified Modeling Language(UML)
token
beginning
const
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.
#include
information hiding
identifiers
classes
41. Allows the programmer to store a value in a variable
setw
inline functions
assignment statement
default constructor
42. tab
function parameters
scope resolution operator
t
#include directive
43. Classes can have relationships with other classes. These relationships are called ________.
identifiers
pointer
associations
object-oriented analysis and design (OOAD)
44. A memory location with a name and data type - its content may be changed during program execution
register
like-type expression
variable
floating-point
45. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
&
loader
#include
t
46. The ________ program combines the output of the compiler with various library functions to produce an executable image.
register
linker
scope resolution operator
function call
47. * / % + -
Arithmetic Operators
&
pointer
.cpp
48. Sets floating-point values to a fixed decimal format
pointer
fixed
Default memberwise assignment
definition
49. Lists and tables of values can be stored in arrays or __________.
cin >> variable
vectors
polymorphism
function prototype
50. Every C++ statement ends with a(n) _________.
template
semicolon
/n
auto