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_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
address
#include
scope
if...else
2. Returns the length of a string excluding the null terminator.
searching
strlen()
comments
scope
3. The stream extraction operator
type coercion
/n
>>
Arithmetic Operators
4. Classes can have relationships with other classes. These relationships are called ________.
associations
Unified Modeling Language(UML)
semicolon
register
5. To explicitly indicate that a value is to be converted to another type
0
opened
type casting (conversion)
like-type expression
6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
address
comments
0
7. Function ________ is used to set the random number seed to randomize a program.
srand
main
address
cin >> variable
8. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
member
constant variable
{ }
9. Names of things that are used in a program - can apply to variables & constants and functions
delete
identifiers
Stack overflow
register
10. Keyword public is a(n) _________
access specifier
member
derived class
escape sequences
11. The number used to refer to a particular element of an array is called its ________.
subscript (or index)
constant variable
void
heap
12. __________ can be used to assign an object of a class to another object of the same class.
&
pointer
Default memberwise assignment
default constructor
13. The ________ enables access to a global variable with the same name as a variable in the current scope.
#include directive
unary scope resolution operator (::)
left
variables
14. Used to qualify hidden names so that they can be used.
preprocessor
address
scope resolution operator
heap
15. A set of values together with a set of operations
associations
rand
data type
Preprocessor
16. A ________ program executes before the compiler's translation phase begins.
register
preprocessor
semicolon
vectors
17. The three values that can be used to initialize a pointer are 0 - __________ and an address.
NULL
Counter-controlled or definite
cin >> variable
classes
18. A human readable file that contains C++ program
object file
source file
object-oriented analysis and design (OOAD)
public
19. You can declare default values for a function in the ____________________.
operator
non-static
Unified Modeling Language(UML)
function parameters
20. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
prompt
#include directive
type casting (conversion)
21. Class members specified as _________ are accessible anywhere an object of the class is in scope.
private
public
overloading
Literals
22. 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
Arithmetic Operators
overloading
delete
base
23. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
void pointer
cin.get(ch)
n
classes
24. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
::
Unified Modeling Language(UML)
Default memberwise assignment
continue
25. Sets floating-point values to a fixed decimal format
fixed
attributes
static
associations
26. tab
getline
return
t
inline functions
27. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
auto
private
information hiding
inline functions
28. Message displayed to the screen asking user for input; generated with an output statement
function prototype
?
prompt
semantics
29. To write data to a file you define an object of which one of the following
stack
mixed expression
ofstream
new line
30. The address-of operator. it is used to assign pointers and to print the address of variables.
rand
&
cmath
friend
31. Used for dynamically allocated variables
heap
stack
unary scope resolution operator (::)
searching
32. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
like-type expression
char
const
#include <headerfilename>
33. Associate an identifier with a memory location
return
information hiding
Unified Modeling Language(UML)
allocating memory
34. 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.
0
static_cast<char>(65)
Sentinel
address
35. 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.
void pointer
type
strlen()
static
36. Initializers __________ must be used to initialize constant members of a class.
type casting (conversion)
function call
return
member
37. An expression in which all operands have the same data type - result will have the same data type as operands
#include
void
like-type expression
getline
38. The only integer that can be assigned directly to a pointer is_____________.
scope
0
&
Semicolon
39. data types that refer to numbers with decimals
base
floating-point
return
editor
40. A program that finds and attaches to your program the indicated libraries for compilation
preprocessor
overloading
global
cin.get(ch)
41. This is used to mark the end of a complete C++ programming statement.
Semicolon
escape sequences
special symbols
char
42. Words that are used for special purposes in a program
function prototype
function overloading
setw
reserved words
43. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
void pointer
reserved words
function prototype
inline functions
44. All ______ must be declared before they are used.
classes
function scope
const datatype identifier = value
variables
45. Characters used to separate symbols or reserved words or identifiers and statements
Arithmetic Operators
function call
special symbols
whitespace
46. The process of determining if an array contains a particular key value is called _________ the array.
const
editor
preprocessor
searching
47. = & | are examples of ____________.
srand
virtual functions
special symbols
syntax
48. A type of pointer that can point at objects of any data type.
void pointer
scope resolution operator
type
preprocessor
49. Every C++ program begins execution at the function _________.
heap
main
whitespace
default constructor
50. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
public
cin >> variable
#include