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. Associate an identifier with a memory location
template
sorting
new line
allocating memory
2. A file must be ________ before data can be written to or read from it.
cin
floating-point
getline
opened
3. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
friend
public
function scope
information hiding
4. The storage-class specifiers are mutable - auto - ________ - extern and static.
initialized
vectors
register
integer operands
5. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
two-dimensional
<<
Stack overflow
member
6. The process of analyzing and designing a system from an object-oriented point of view is called ________.
beginning
whitespace
operand value
object-oriented analysis and design (OOAD)
7. The process of placing the elements of an array in order is called ________ the array.
dot (.)
sorting
if
&
8. The idea that you can call the same function and the output will depend on the type of object you're using.
NULL
recursive
polymorphism
whitespace
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.
source file
return
cout
continue
10. A variable declared outside any block or function is a ________ variable.
global
beginning
sorting
recursive
11. The only integer that can be assigned directly to a pointer is_____________.
associations
register
0
type coercion
12. 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.
cin >> variable
Sentinel
strcmp()
break
13. If a member initializer is not provided for a member object of a class the object's __________ is called.
definition
NULL
::
default constructor
14. Classes can have relationships with other classes. These relationships are called ________.
void
associations
case sensitive
derived class
15. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
friend
recursive
new line
heap
16. A sequence of operands and operators that describe a calculation to be performed
whitespace
floating-point
arithmetic expression
classes
17. 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.
local variable
globals
>>
information hiding
18. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
<<
selection
void pointer
&
19. Preprocessor directive syntax
#include <headerfilename>
char
preprocessor
preprocessor
20. All ______ must be declared before they are used.
variables
sorting
pointer
reserve words
21. All C++ Variables are_________.
polymorphism
case sensitive
function parameters
Sentinel
22. 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
23. * / % + -
char
type
Arithmetic Operators
switch
24. 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.
overloading
.cpp
/n
?
25. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
comments
integer operands
char
attributes
26. Symbol that denotes an action to be performed
type coercion
special symbols
operator
srand
27. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
assignment
Default memberwise assignment
overloading
pointer
28. 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.
operator overloading
linker
/n
{ }
29. A __________ should be used to declare the size of an array because it makes the program more scalable.
loader
virtual functions
Literals
constant variable
30. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
binary operator
if...else
token
vectors
31. A memory location with a name and data type - its content may be changed during program execution
variable
Stack overflow
showpoint
public
32. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
if...else
friend
before
.cpp
33. Naming convention for C++ programs
.cpp
syntax
srand
before
34. Type casting syntax
static_cast<char>(65)
editor
attributes
data type
35. The stream extraction operator
static
Closing brace
cin
>>
36. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
Semicolon
#include
switch
static_cast<char>(65)
37. Use 2 characters to represent one
escape sequences
Sentinel
Semicolon
access specifier
38. Every C++ statement ends with a(n) _________.
semicolon
//
int values
&
39. To write data to a file you define an object of which one of the following
unary scope resolution operator (::)
type
special symbols
ofstream
40. The three ways to return control from a called function to a caller are ________ - return expression and encounter.
stack
Preprocessor
delete
return
41. In inheritance the ____________ is the class the receives the inherited members.
derived class
/n
beginning
cin >> variable
42. To allow file access in a program you must #include this header file.
fstream
base class
function overloading
data type
43. An object's non-static member functions have access to a "self pointer" to the object called the __________ pointer.
{ }
>>
this
information hiding
44. The modulus operator (%) can be used only with __________.
fixed
int values
recursive function
integer operands
45. Function ________ is used to set the random number seed to randomize a program.
preprocessor
non-static
srand
type casting (conversion)
46. Returns the length of a string excluding the null terminator.
return
preprocessor
strlen()
cin.get(ch)
47. Characters used to separate symbols or reserved words or identifiers and statements
function call
operator overloading
address
whitespace
48. Grammar rules of the language; compiler will try to identify and locate syntax errors
getline
editor
syntax
searching
49. A C++ statement that makes a decision is ______.
ofstream
mixed expression
Default memberwise assignment
if
50. The size & shape & color and weight of an object are considered
if
attributes
escape sequences
local variable