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.
&
delete
information hiding
assignment
2. Compares two strings and returns 0 if they are equal.
&
main
static
strcmp()
3. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
main
mixed expression
friend
4. An operator that can only be used with int values. result will always be an int.
object-oriented analysis and design (OOAD)
globals
identifiers
% modulus
5. Used to qualify hidden names so that they can be used.
data type
scope resolution operator
left
virtual functions
6. The elements of an array are related by the fact that they have the same name and ___________.
type
unary operator
arithmetic expression
#include directive
7. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
comments
if
break
pointer
8. A function is invoked with a ________.
getline
&
cin
function call
9. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
before
token
local variable
unary scope resolution operator (::)
10. Names of things that are used in a program - can apply to variables & constants and functions
register
reserved words
identifiers
data type
11. A member function should be declared static if it does not access __________ class members.
strcpy()
non-static
new line
address
12. This is used to mark the end of a complete C++ programming statement.
Semicolon
const datatype identifier = value
named constant
&
13. 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
type coercion
pointer
#include <headerfilename>
14. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
selection
cin >> variable
const datatype identifier = value
Unified Modeling Language(UML)
15. 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
strlen()
default constructor
16. The escape sequence ___ when output with cout and the stream insertion operator - causes the cursor to position to the beginning of the next line on the screen.
derived class
object-oriented analysis and design (OOAD)
non-static
/n
17. The ________ qualifier is used to declare read-only variables.
overloading
member
const
.cpp
18. If a member initializer is not provided for a member object of a class the object's __________ is called.
semantics
allocating memory
preprocessor
default constructor
19. 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.
register
void
recursive
function prototype
20. Classes can have relationships with other classes. These relationships are called ________.
special symbols
associations
new line
Preprocessor
21. Used for dynamically allocated variables
heap
derived class
information hiding
object-oriented analysis and design (OOAD)
22. newline
non-static
return
char
n
23. Symbol that denotes an action to be performed
.cpp
//
operator
strlen()
24. Naming convention for C++ programs
.cpp
globals
scope
preprocessor
25. These are data items whose values do not change while the program is running
cin
Literals
fixed
prompt
26. Sets floating-point values to a fixed decimal format
::
fixed
default constructor
unary scope resolution operator (::)
27. When a value of one data type is implicitly (automatically) changed to another data type
classes
loader
object-oriented analysis and design (OOAD)
type coercion
28. Header file that contains commonly performed mathematical functions
cmath
default constructor
showpoint
NULL
29. A C++ statement that makes a decision is ______.
fixed
if
stack
Sentinel
30. This manipulator is used to establish a field width for the value immediately following it.
type casting (conversion)
register
comments
setw
31. A filestream variable that represents the default output device
static
<<
cout
::
32. 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 (.)
strcpy()
opened
friend
33. 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
34. data types that refer to numbers with decimals
function prototype
information hiding
escape sequences
floating-point
35. The ________ program transfers the executable image of a C++ program from disk to memory.
like-type expression
friend
loader
escape sequences
36. Message displayed to the screen asking user for input; generated with an output statement
Stack overflow
prompt
Closing brace
escape sequences
37. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
int values
token
new line
&
38. Preprocessor directive syntax
#include <headerfilename>
NULL
inline functions
comments
39. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
Arithmetic Operators
classes
type casting (conversion)
syntax
40. The modulus operator (%) can be used only with __________.
recursive function
integer operands
showpoint
overloading
41. A __________ should be used to declare the size of an array because it makes the program more scalable.
break
information hiding
definition
constant variable
42. 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.
Sentinel
#include
cout
function parameters
43. In inheritance the ____________ is the class that supplies the inherited members.
case sensitive
vectors
new line
base class
44. Words that are used for special purposes in a program
fixed
reserved words
polymorphism
inline functions
45. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
case sensitive
reserve words
#include directive
friend
46. A human readable file that contains C++ program
local variable
classes
source file
definition
47. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
pointer
globals
&
vectors
48. A variable declared outside any block or function is a ________ variable.
auto
virtual functions
left
global
49. Executable version of program
base class
overloading
object file
classes
50. 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
>>
floating-point
base
delete