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 address-of operator. it is used to assign pointers and to print the address of variables.
operand value
ofstream
access specifier
&
2. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
scope resolution operator
floating-point
//
whitespace
3. The three values that can be used to initialize a pointer are 0 - __________ and an address.
linker
strcmp()
break
NULL
4. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
inline functions
char
function call
operator overloading
5. data types that refer to numbers with decimals
selection
this
scope resolution operator
floating-point
6. 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.
*
editor
static
selection
7. A ________ program executes before the compiler's translation phase begins.
/n
preprocessor
constant variable
template
8. All C++ Variables are_________.
friend
special symbols
switch
case sensitive
9. The sign you use for pointers
strcpy()
information hiding
dot (.)
*
10. Whole numbers - no decimals and no commas included
int values
function scope
Preprocessor
inheritance
11. This allows the writer to create functions of the same name as long as they have different parameters or different quantities of parameters.
function overloading
type
subscript (or index)
fixed
12. Lists and tables of values can be stored in arrays or __________.
special symbols
Semicolon
break
vectors
13. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
object file
source file
named constant
//
14. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
special symbols
heap
switch
like-type expression
15. = & | are examples of ____________.
main
object file
special symbols
char
16. The ________ enables access to a global variable with the same name as a variable in the current scope.
?
unary scope resolution operator (::)
overloading
opened
17. You must have a ___________ for every variable you intend to use in a program
void
definition
preprocessor
attributes
18. Grammar rules of the language; compiler will try to identify and locate syntax errors
floating-point
main
syntax
global
19. 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.
floating-point
continue
preprocessor
classes
20. Keyword public is a(n) _________
case sensitive
switch
access specifier
global
21. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
type coercion
endl (same as 'n')
function prototype
access specifier
22. In inheritance the ____________ is the class the receives the inherited members.
mixed expression
derived class
void
operand value
23. The process of analyzing and designing a system from an object-oriented point of view is called ________.
object-oriented analysis and design (OOAD)
default constructor
>>
type
24. The symbol for the binary scope resolution operator
heap
//
globals
::
25. An array that uses two subscripts is referred to as a(n) _________ array.
two-dimensional
t
syntax
strcmp()
26. The size & shape & color and weight of an object are considered
% modulus
local variable
operand value
attributes
27. Type casting syntax
Closing brace
heap
like-type expression
static_cast<char>(65)
28. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
opened
continue
static
29. You can declare default values for a function in the ____________________.
searching
function parameters
Literals
<<
30. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
opened
rand
break
auto
31. This manipulator is used to establish a field width for the value immediately following it.
srand
operator
setw
if...else
32. Forces the computer to display decimal point and trailing zeroes
Stack overflow
showpoint
Closing brace
vectors
33. Every C++ program begins execution at the function _________.
main
syntax
strcmp()
NULL
34. A human readable file that contains C++ program
source file
unary scope resolution operator (::)
syntax
operand value
35. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
cmath
floating-point
char
36. 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
&
base
object-oriented analysis and design (OOAD)
fstream
37. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
reserve words
const
this
stack
38. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
binary operator
whitespace
auto
0
39. tab
t
cin.get(ch)
#include <headerfilename>
Closing brace
40. 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
41. A __________ should be used to declare the size of an array because it makes the program more scalable.
classes
constant variable
default constructor
like-type expression
42. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
semicolon
function prototype
recursive
global
43. The stream insertion operator
inheritance
{ }
type
<<
44. Every C++ statement ends with a(n) _________.
polymorphism
semicolon
recursive function
//
45. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
unary operator
getline
setw
reserved words
46. The number used to refer to a particular element of an array is called its ________.
strcpy()
cin.get(ch)
before
subscript (or index)
47. The process of determining if an array contains a particular key value is called _________ the array.
searching
auto
whitespace
t
48. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
Counter-controlled or definite
Closing brace
special symbols
49. Header file that contains commonly performed mathematical functions
cmath
return
Semicolon
identifiers
50. 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.
cin.get(ch)
setw
void
static