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 size & shape & color and weight of an object are considered
variable
*
const
attributes
2. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
allocating memory
const
named constant
auto
3. 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
4. A set of values together with a set of operations
if...else
identifiers
whitespace
data type
5. = & | are examples of ____________.
special symbols
assignment statement
strcmp()
void pointer
6. Allows the programmer to store a value in a variable
auto
overloading
binary operator
assignment statement
7. Symbol that denotes an action to be performed
operator
Preprocessor
heap
semantics
8. The three values that can be used to initialize a pointer are 0 - __________ and an address.
variables
main
NULL
whitespace
9. A variable declared outside any block or function is a ________ variable.
int values
global
selection
this
10. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
associations
const
Stack overflow
left
11. The ________ program transfers the executable image of a C++ program from disk to memory.
loader
char
scope resolution operator
cin.get(ch)
12. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
cout
binary operator
private
beginning
13. A function ________ enables a single function to be defined to perform a task on many different data types.
function scope
default constructor
pointer
template
14. All ______ must be declared before they are used.
const datatype identifier = value
variables
definition
reserve words
15. C++ programs are normally typed into a computer using a(n) ________ program.
private
editor
token
new line
16. An array that uses two subscripts is referred to as a(n) _________ array.
constant variable
two-dimensional
NULL
strlen()
17. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
{ }
inheritance
selection
18. A function is invoked with a ________.
heap
Default memberwise assignment
#include directive
function call
19. Operator with two operands
binary operator
non-static
like-type expression
private
20. * / % + -
recursive function
register
Arithmetic Operators
fstream
21. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
public
void
overloading
&
22. Keyword public is a(n) _________
function overloading
access specifier
Arithmetic Operators
void
23. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
void
variable
main
function scope
24. Objects have the property of ________although objects may know how to communicate with one another across well-defined interfaces - they normally are not allowed to know how other objects are implemented.
void
editor
information hiding
const
25. If a member initializer is not provided for a member object of a class the object's __________ is called.
static_cast<char>(65)
default constructor
vectors
recursive
26. To write data to a file you define an object of which one of the following
initialized
register
ofstream
const datatype identifier = value
27. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
if
globals
pointer
classes
28. The __________ operator reclaims memory previously allocated by new.
% modulus
preprocessor
delete
Arithmetic Operators
29. These are data items whose values do not change while the program is running
type
Counter-controlled or definite
Literals
NULL
30. A file must be ________ before data can be written to or read from it.
strcpy()
opened
associations
global
31. Message displayed to the screen asking user for input; generated with an output statement
prompt
like-type expression
n
overloading
32. 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.
private
Sentinel
overloading
beginning
33. An operator that can only be used with int values. result will always be an int.
% modulus
.cpp
variable
preprocessor
34. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
setw
dot (.)
break
35. Header file that contains commonly performed mathematical functions
cin.get(ch)
cmath
a.out
srand
36. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
named constant
//
identifiers
function scope
37. A member function should be declared static if it does not access __________ class members.
non-static
#include
cin.get(ch)
linker
38. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
floating-point
address
Unified Modeling Language(UML)
cmath
39. A variable that holds the address of another variable.
pointer
object file
comments
token
40. tab
if...else
template
t
const datatype identifier = value
41. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
register
preprocessor
left
private
42. All C++ Variables are_________.
editor
case sensitive
escape sequences
scope
43. Names of things that are used in a program - can apply to variables & constants and functions
preprocessor
identifiers
object-oriented analysis and design (OOAD)
semicolon
44. Operator with only one operand
if
unary operator
cin.get(ch)
int values
45. This is used to mark the end of a complete C++ programming statement.
function parameters
register
Semicolon
strcmp()
46. Returns the length of a string excluding the null terminator.
>>
strlen()
const
Literals
47. Initializers __________ must be used to initialize constant members of a class.
member
preprocessor
#include <headerfilename>
escape sequences
48. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
operand value
member
char
break
49. A function that calls itself
recursive function
member
return
#include directive
50. Every C++ statement ends with a(n) _________.
inheritance
semicolon
linker
this