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. A program that finds and attaches to your program the indicated libraries for compilation
register
preprocessor
editor
Counter-controlled or definite
2. All C++ Variables are_________.
Stack overflow
case sensitive
linker
NULL
3. Executable version of program
fixed
allocating memory
linker
object file
4. Preprocessor directive syntax
const
#include <headerfilename>
recursive function
template
5. data types that refer to numbers with decimals
floating-point
function parameters
type
like-type expression
6. Syntax for named constant declaration
recursive function
integer operands
rand
const datatype identifier = value
7. Program components in C++ are called functions and ________.
private
<<
classes
//
8. A __________ data member represents class-wide information.
classes
void
static
recursive
9. A sequence of operands and operators that describe a calculation to be performed
NULL
arithmetic expression
function parameters
subscript (or index)
10. Associate an identifier with a memory location
type coercion
arithmetic expression
pointer
allocating memory
11. This manipulator is used to establish a field width for the value immediately following it.
stack
setw
token
classes
12. Keyword public is a(n) _________
static_cast<char>(65)
const
access specifier
void pointer
13. A ________ program executes before the compiler's translation phase begins.
endl (same as 'n')
preprocessor
address
const
14. C++ programs are normally typed into a computer using a(n) ________ program.
editor
cin.get(ch)
auto
static
15. __________ can be used to assign an object of a class to another object of the same class.
stack
Default memberwise assignment
object-oriented analysis and design (OOAD)
void pointer
16. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
non-static
register
information hiding
token
17. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
floating-point
private
integer operands
void pointer
18. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
assignment statement
new line
base
syntax
19. Lists and tables of values can be stored in arrays or __________.
floating-point
vectors
t
Arithmetic Operators
20. Returns the length of a string excluding the null terminator.
stack
return
void
strlen()
21. A pointer is a variable that contains as its value the____________ of another variable.
address
subscript (or index)
n
base class
22. The ________ program combines the output of the compiler with various library functions to produce an executable image.
information hiding
switch
globals
linker
23. A file must be ________ before data can be written to or read from it.
opened
?
special symbols
int values
24. The _____ causes the contents of another file to be inserted into a program.
strcmp()
main
cout
#include directive
25. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
dot (.)
char
global
beginning
26. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
return
char
strlen()
27. A __________ should be used to declare the size of an array because it makes the program more scalable.
friend
classes
constant variable
whitespace
28. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
virtual functions
//
classes
pointer
29. In inheritance the ____________ is the class that supplies the inherited members.
//
base class
static
like-type expression
30. tab
stack
t
function call
overloading
31. You must have a ___________ for every variable you intend to use in a program
definition
{ }
type coercion
strlen()
32. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
template
main
function scope
Sentinel
33. Compares two strings and returns 0 if they are equal.
initialized
strcmp()
public
heap
34. A function is invoked with a ________.
object file
function call
>>
comments
35. A filestream variable that represents the default input source
% modulus
Literals
cin
type
36. A variable declared outside any block or function is a ________ variable.
prompt
global
new line
>>
37. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
whitespace
special symbols
this
recursive
38. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
assignment
function prototype
strlen()
type
39. Names of things that are used in a program - can apply to variables & constants and functions
unary scope resolution operator (::)
cin.get(ch)
reserved words
identifiers
40. OOD also takes advantage of ________ relationships where new classes of objects are derived by absorbing characteristics of existing classes - then adding unique characteristics of their own.
{ }
inheritance
?
if...else
41. Meaning of the instructions in the language; compiler cannot find these errors - often called logic errors
semantics
function prototype
<<
operator overloading
42. These are data items whose values do not change while the program is running
identifiers
member
void pointer
Literals
43. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
cin >> variable
case sensitive
reserved words
address
44. All ______ must be declared before they are used.
variables
virtual functions
Preprocessor
address
45. Message displayed to the screen asking user for input; generated with an output statement
prompt
Preprocessor
type coercion
{ }
46. To explicitly indicate that a value is to be converted to another type
void
unary operator
type casting (conversion)
stack
47. Grammar rules of the language; compiler will try to identify and locate syntax errors
stack
preprocessor
syntax
if...else
48. Words that are used for special purposes in a program
cin
reserved words
function scope
continue
49. The idea that you can call the same function and the output will depend on the type of object you're using.
polymorphism
::
arithmetic expression
return
50. Allows the programmer to store a value in a variable
classes
assignment statement
virtual functions
Unified Modeling Language(UML)