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 __________ should be used to declare the size of an array because it makes the program more scalable.
cin >> variable
switch
constant variable
non-static
2. The conditional operator. it evaluates a line of code and returns one thing if the condition is true and a different thing if the condition is false.
fstream
endl (same as 'n')
#include <headerfilename>
?
3. A pointer is a variable that contains as its value the____________ of another variable.
const datatype identifier = value
cin >> variable
address
operator overloading
4. Type casting syntax
access specifier
static_cast<char>(65)
char
assignment
5. directive A statement that starts with a # is called a ____________.
Preprocessor
sorting
&
syntax
6. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
opened
integer operands
token
mixed expression
7. Operator with only one operand
a.out
unary operator
*
inheritance
8. A program that finds and attaches to your program the indicated libraries for compilation
getline
scope resolution operator
cout
preprocessor
9. 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.
semantics
Preprocessor
syntax
continue
10. 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.
if
access specifier
/n
Stack overflow
11. tab
searching
t
object file
ofstream
12. The stream extraction operator
rand
>>
default constructor
public
13. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
vectors
static
type coercion
named constant
14. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
subscript (or index)
comments
stack
15. Used for function calls and local variables
two-dimensional
derived class
stack
?
16. Initializers __________ must be used to initialize constant members of a class.
strlen()
member
private
Preprocessor
17. Member objects are constructed __________ their enclosing class object.
const
% modulus
before
dot (.)
18. Keyword public is a(n) _________
access specifier
const datatype identifier = value
global
setw
19. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
assignment
whitespace
Arithmetic Operators
new line
20. A C++ statement that makes a decision is ______.
return
auto
if
information hiding
21. A function that can be used to read character data including whitespace
type coercion
prompt
cin.get(ch)
getline
22. The size & shape & color and weight of an object are considered
sorting
Stack overflow
attributes
&
23. Names of things that are used in a program - can apply to variables & constants and functions
setw
variable
identifiers
fstream
24. A member function should be declared static if it does not access __________ class members.
function overloading
virtual functions
0
non-static
25. The __________ operator reclaims memory previously allocated by new.
const
delete
variables
escape sequences
26. Program components in C++ are called functions and ________.
loader
like-type expression
classes
selection
27. A constant object must be __________; it cannot be modified after it is created.
unary operator
semantics
Stack overflow
initialized
28. The _________ begins the body of every function and the _________ ends the body of every function.
{ }
Sentinel
Counter-controlled or definite
if...else
29. The ________ enables access to a global variable with the same name as a variable in the current scope.
srand
public
fixed
unary scope resolution operator (::)
30. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
special symbols
t
inline functions
31. A sequence of operands and operators that describe a calculation to be performed
void
arithmetic expression
&
operator
32. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
preprocessor
classes
0
loader
33. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
information hiding
#include directive
static_cast<char>(65)
34. Classes can have relationships with other classes. These relationships are called ________.
associations
classes
function scope
searching
35. The modulus operator (%) can be used only with __________.
case sensitive
register
main
integer operands
36. A __________ data member represents class-wide information.
base class
subscript (or index)
dot (.)
static
37. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
special symbols
selection
comments
inheritance
38. A function ________ enables a single function to be defined to perform a task on many different data types.
whitespace
object file
derived class
template
39. Default name of executable file
strcmp()
cin.get(ch)
semicolon
a.out
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. Identifier or expression that is part of the calculation to be performed
operand value
*
#include <headerfilename>
register
42. A ________ program executes before the compiler's translation phase begins.
searching
semicolon
preprocessor
static_cast<char>(65)
43. int namespace include using return examples of ___________
object file
<<
reserve words
like-type expression
44. Executable version of program
before
#include directive
variables
object file
45. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
member
return
#include
type coercion
46. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
NULL
allocating memory
register
stack
47. = & | are examples of ____________.
non-static
special symbols
assignment statement
initialized
48. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
/n
friend
preprocessor
scope resolution operator
49. A memory location with a name and data type - its content may be changed during program execution
if
heap
variable
register
50. Function ________ is used to produce random numbers.
rand
variable
register
static