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. Naming convention for C++ programs
const datatype identifier = value
cin.get(ch)
allocating memory
.cpp
2. Forces the computer to display decimal point and trailing zeroes
showpoint
0
preprocessor
virtual functions
3. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
type
data type
dot (.)
4. A variable declared outside any block or function is a ________ variable.
global
escape sequences
inheritance
opened
5. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
function overloading
Unified Modeling Language(UML)
allocating memory
n
6. When a value of one data type is implicitly (automatically) changed to another data type
whitespace
linker
strcpy()
type coercion
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
operator
base
scope
function scope
8. Used for function calls and local variables
scope resolution operator
stack
Default memberwise assignment
base class
9. Used for dynamically allocated variables
heap
mixed expression
integer operands
static
10. The ________ program combines the output of the compiler with various library functions to produce an executable image.
function scope
cin.get(ch)
template
linker
11. tab
polymorphism
Counter-controlled or definite
t
a.out
12. Names of things that are used in a program - can apply to variables & constants and functions
identifiers
ofstream
global
operator overloading
13. The address-of operator. it is used to assign pointers and to print the address of variables.
{ }
t
cin
&
14. Compares two strings and returns 0 if they are equal.
operator overloading
Stack overflow
break
strcmp()
15. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
Stack overflow
preprocessor
recursive function
inline functions
16. Most calculations are normally performed by ______ statements.
assignment
const datatype identifier = value
scope resolution operator
syntax
17. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
token
opened
function prototype
comments
18. These are data items whose values do not change while the program is running
type
Literals
special symbols
void
19. The number used to refer to a particular element of an array is called its ________.
cout
#include directive
subscript (or index)
classes
20. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
char
type
#include
function call
21. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
whitespace
return
mixed expression
22. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
global
strlen()
initialized
recursive
23. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
selection
recursive
const
pointer
24. 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.
main
dot (.)
void
friend
25. The ________ program transfers the executable image of a C++ program from disk to memory.
opened
loader
&
private
26. You must have a ___________ for every variable you intend to use in a program
#include <headerfilename>
scope resolution operator
definition
opened
27. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
semantics
selection
constant variable
main
28. A variable that holds the address of another variable.
allocating memory
pointer
subscript (or index)
void
29. The storage-class specifiers are mutable - auto - ________ - extern and static.
return
endl (same as 'n')
auto
register
30. When it is not known in advance how many times a set of statements will be repeated a _________value can be used to terminate the repetition.
case sensitive
Sentinel
heap
Unified Modeling Language(UML)
31. directive A statement that starts with a # is called a ____________.
Preprocessor
Default memberwise assignment
source file
private
32. The elements of an array are related by the fact that they have the same name and ___________.
#include directive
inline functions
unary scope resolution operator (::)
type
33. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
base
continue
<<
new line
34. C++ programs are normally typed into a computer using a(n) ________ program.
loader
cin
editor
&
35. For every opening brace in a C++ program there must be a ______________.
Closing brace
base class
int values
address
36. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
static_cast<char>(65)
identifiers
semantics
function scope
37. This is used to mark the end of a complete C++ programming statement.
srand
associations
Semicolon
prompt
38. Use 2 characters to represent one
::
delete
escape sequences
semicolon
39. A sequence of operands and operators that describe a calculation to be performed
int values
named constant
arithmetic expression
classes
40. The _________ begins the body of every function and the _________ ends the body of every function.
source file
{ }
member
Arithmetic Operators
41. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
void
Closing brace
reserved words
42. Initializers __________ must be used to initialize constant members of a class.
operand value
continue
static
member
43. Two slash marks ( // ) indicate __________ of a comment
new line
beginning
a.out
0
44. A member function should be declared static if it does not access __________ class members.
setw
associations
non-static
member
45. A program that finds and attaches to your program the indicated libraries for compilation
function call
preprocessor
<<
assignment statement
46. Whole numbers - no decimals and no commas included
operand value
register
int values
operator overloading
47. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
fixed
rand
cin >> variable
.cpp
48. The process of analyzing and designing a system from an object-oriented point of view is called ________.
assignment statement
object-oriented analysis and design (OOAD)
>>
reserved words
49. A pointer is a variable that contains as its value the____________ of another variable.
Closing brace
t
inline functions
address
50. The sign you use for references
linker
?
type
&