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. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
continue
break
selection
this
2. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Stack overflow
identifiers
>>
Unified Modeling Language(UML)
3. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
syntax
switch
variable
case sensitive
4. The idea that you can call the same function and the output will depend on the type of object you're using.
attributes
polymorphism
register
/n
5. Keyword public is a(n) _________
static
access specifier
const
identifiers
6. The sign you use for pointers
new line
whitespace
*
{ }
7. 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
assignment statement
function scope
if...else
base
8. The ________ program transfers the executable image of a C++ program from disk to memory.
% modulus
scope
semicolon
loader
9. The __________ operator reclaims memory previously allocated by new.
allocating memory
unary scope resolution operator (::)
delete
switch
10. All ______ must be declared before they are used.
variables
private
Closing brace
function scope
11. You can declare default values for a function in the ____________________.
srand
function parameters
Preprocessor
pointer
12. Class members specified as _________ are accessible anywhere an object of the class is in scope.
non-static
public
classes
a.out
13. Executable version of program
register
definition
object file
fixed
14. 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
15. A __________ should be used to declare the size of an array because it makes the program more scalable.
information hiding
editor
int values
constant variable
16. Allows the programmer to store a value in a variable
named constant
static_cast<char>(65)
assignment statement
reserve words
17. A program that finds and attaches to your program the indicated libraries for compilation
access specifier
information hiding
preprocessor
polymorphism
18. Naming convention for C++ programs
.cpp
strcmp()
Arithmetic Operators
binary operator
19. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
static_cast<char>(65)
Sentinel
Unified Modeling Language(UML)
20. Most calculations are normally performed by ______ statements.
assignment
Counter-controlled or definite
beginning
like-type expression
21. A variable that is known only within the function in which it is defined is called a ________.
{ }
information hiding
default constructor
local variable
22. Characters used to separate symbols or reserved words or identifiers and statements
subscript (or index)
whitespace
#include <headerfilename>
information hiding
23. The process of placing the elements of an array in order is called ________ the array.
sorting
?
identifiers
derived class
24. The stream extraction operator
cin
attributes
type coercion
>>
25. Creates a copy of a string.
local variable
a.out
strcpy()
data type
26. 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.
operand value
derived class
access specifier
?
27. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
switch
definition
stack
return
28. 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.
dot (.)
t
special symbols
private
29. In inheritance the ____________ is the class the receives the inherited members.
return
function overloading
strcpy()
derived class
30. 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.
const
subscript (or index)
information hiding
classes
31. An operator that can only be used with int values. result will always be an int.
classes
% modulus
rand
classes
32. A file must be ________ before data can be written to or read from it.
opened
<<
unary scope resolution operator (::)
rand
33. Preprocessor directive syntax
Unified Modeling Language(UML)
#include <headerfilename>
friend
type casting (conversion)
34. Program components in C++ are called functions and ________.
::
register
classes
.cpp
35. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
unary scope resolution operator (::)
named constant
//
opened
36. A ________ program executes before the compiler's translation phase begins.
token
preprocessor
{ }
% modulus
37. To explicitly indicate that a value is to be converted to another type
semicolon
.cpp
type casting (conversion)
<<
38. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
operator
syntax
register
type
39. A C++ statement that makes a decision is ______.
variables
if
scope resolution operator
non-static
40. The modulus operator (%) can be used only with __________.
integer operands
assignment
linker
new line
41. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
new line
rand
NULL
Arithmetic Operators
42. An expression that has operands with different data types
t
default constructor
mixed expression
delete
43. C++ programs are normally typed into a computer using a(n) ________ program.
editor
pointer
Default memberwise assignment
Stack overflow
44. The ________ enables access to a global variable with the same name as a variable in the current scope.
*
unary scope resolution operator (::)
#include directive
void
45. * / % + -
semantics
break
Arithmetic Operators
heap
46. Two slash marks ( // ) indicate __________ of a comment
cin >> variable
beginning
function call
base class
47. newline
<<
void pointer
n
strcpy()
48. All C++ Variables are_________.
object-oriented analysis and design (OOAD)
case sensitive
operand value
continue
49. In inheritance the ____________ is the class that supplies the inherited members.
overloading
base class
cin.get(ch)
variable
50. A sequence of operands and operators that describe a calculation to be performed
type casting (conversion)
arithmetic expression
syntax
special symbols