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. tab
strcpy()
Stack overflow
pointer
t
2. For every opening brace in a C++ program there must be a ______________.
cout
special symbols
//
Closing brace
3. Syntax for named constant declaration
?
const datatype identifier = value
t
auto
4. A function ________ enables a single function to be defined to perform a task on many different data types.
subscript (or index)
template
Sentinel
Unified Modeling Language(UML)
5. The elements of an array are related by the fact that they have the same name and ___________.
a.out
type
syntax
integer operands
6. = & | are examples of ____________.
?
constant variable
named constant
special symbols
7. Preprocessor directive syntax
fixed
allocating memory
#include <headerfilename>
unary scope resolution operator (::)
8. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
opened
void
auto
operator overloading
9. You can declare default values for a function in the ____________________.
&
function parameters
#include directive
showpoint
10. The process of analyzing and designing a system from an object-oriented point of view is called ________.
integer operands
return
object-oriented analysis and design (OOAD)
data type
11. Every C++ statement ends with a(n) _________.
0
semicolon
assignment
main
12. Whole numbers - no decimals and no commas included
void
variable
Stack overflow
int values
13. Most calculations are normally performed by ______ statements.
assignment
classes
rand
searching
14. The symbol for the binary scope resolution operator
preprocessor
named constant
derived class
::
15. Used for function calls and local variables
Semicolon
stack
continue
variables
16. Allows the programmer to store a value in a variable
assignment statement
public
this
template
17. A function that can be used to read character data including whitespace
non-static
source file
operator overloading
cin.get(ch)
18. Repeating a set of instructions a specific number of times is called_________repetition.
strcpy()
Unified Modeling Language(UML)
Counter-controlled or definite
const
19. * / % + -
pointer
void
Arithmetic Operators
.cpp
20. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
scope
break
searching
function scope
21. An expression that has operands with different data types
mixed expression
token
globals
base class
22. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
Arithmetic Operators
subscript (or index)
#include
new line
23. int namespace include using return examples of ___________
delete
reserve words
attributes
strlen()
24. 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.
Stack overflow
Sentinel
static_cast<char>(65)
before
25. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
public
static
if...else
escape sequences
26. A variable declared outside any block or function is a ________ variable.
<<
global
Unified Modeling Language(UML)
classes
27. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
return
scope
subscript (or index)
28. Function ________ is used to set the random number seed to randomize a program.
Literals
srand
data type
allocating memory
29. newline
::
non-static
n
like-type expression
30. Executable version of program
static
object file
rand
#include
31. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
reserve words
getline
operator overloading
template
32. 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
33. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
function parameters
globals
function overloading
token
34. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
void
case sensitive
function overloading
reserve words
35. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
switch
linker
function scope
reserve words
36. Class members specified as _________ are accessible anywhere an object of the class is in scope.
two-dimensional
register
public
definition
37. In inheritance the ____________ is the class that supplies the inherited members.
type casting (conversion)
variables
base class
derived class
38. The keyword __________ specifies that an object or variable is not modifiable after it is initialized.
const
cin.get(ch)
Literals
constant variable
39. Two slash marks ( // ) indicate __________ of a comment
setw
return
token
beginning
40. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
operator overloading
selection
return
cin
41. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
srand
recursive
static_cast<char>(65)
showpoint
42. Every C++ program begins execution at the function _________.
Default memberwise assignment
integer operands
static
main
43. The only integer that can be assigned directly to a pointer is_____________.
function overloading
classes
dot (.)
0
44. Grammar rules of the language; compiler will try to identify and locate syntax errors
searching
syntax
char
member
45. 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.
classes
//
dot (.)
public
46. Nonexecutable statements that are included in a program to provide information about what the program does etc.
&
virtual functions
assignment
comments
47. In inheritance the ____________ is the class the receives the inherited members.
definition
derived class
operand value
srand
48. A __________ should be used to declare the size of an array because it makes the program more scalable.
constant variable
function call
allocating memory
Closing brace
49. An array that uses two subscripts is referred to as a(n) _________ array.
selection
Literals
object-oriented analysis and design (OOAD)
two-dimensional
50. Associate an identifier with a memory location
switch
Closing brace
% modulus
allocating memory