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 elements of an array are related by the fact that they have the same name and ___________.
type
variable
getline
Counter-controlled or definite
2. Lists and tables of values can be stored in arrays or __________.
vectors
static_cast<char>(65)
return
&
3. A program that finds and attaches to your program the indicated libraries for compilation
local variable
preprocessor
default constructor
operator overloading
4. Returns the length of a string excluding the null terminator.
strlen()
inline functions
cin
token
5. 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.
selection
strcpy()
void
cin
6. This is used to mark the end of a complete C++ programming statement.
n
Semicolon
selection
recursive function
7. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
address
associations
if...else
preprocessor
8. To allow file access in a program you must #include this header file.
fstream
::
stack
showpoint
9. Classes can have relationships with other classes. These relationships are called ________.
Closing brace
scope resolution operator
associations
variables
10. A variable declared outside any block or function is a ________ variable.
new line
private
attributes
global
11. The four areas that a program uses memory on are: the codes area - the _______ area - the stack and the heap.
#include directive
operator
recursive
globals
12. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
n
Stack overflow
Arithmetic Operators
Unified Modeling Language(UML)
13. Characters used to separate symbols or reserved words or identifiers and statements
whitespace
% modulus
#include <headerfilename>
>>
14. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
assignment
function scope
recursive function
#include directive
15. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
switch
if
<<
escape sequences
16. The stream insertion operator
public
<<
static_cast<char>(65)
static
17. Executable version of program
rand
comments
source file
object file
18. Nonexecutable statements that are included in a program to provide information about what the program does etc.
object-oriented analysis and design (OOAD)
comments
a.out
fstream
19. A ________ program executes before the compiler's translation phase begins.
preprocessor
<<
if...else
return
20. A set of values together with a set of operations
&
data type
//
static_cast<char>(65)
21. A function that can be used to read character data including whitespace
assignment
cin.get(ch)
dot (.)
whitespace
22. A constant object must be __________; it cannot be modified after it is created.
initialized
function call
beginning
cin
23. A filestream variable that represents the default input source
rand
type casting (conversion)
NULL
cin
24. Words that are used for special purposes in a program
reserved words
constant variable
preprocessor
function scope
25. Causes the program exits the loop - skipping over the rest of the commands and starts executing again with the next thing outside the loop.
?
break
pointer
function call
26. The modulus operator (%) can be used only with __________.
integer operands
function call
identifiers
.cpp
27. Header file that contains commonly performed mathematical functions
overloading
cmath
Semicolon
Counter-controlled or definite
28. A __________ data member represents class-wide information.
operand value
static
floating-point
Unified Modeling Language(UML)
29. The _________ begins the body of every function and the _________ ends the body of every function.
unary operator
char
{ }
object-oriented analysis and design (OOAD)
30. Program components in C++ are called functions and ________.
classes
static
Literals
token
31. Every C++ statement ends with a(n) _________.
address
assignment
semicolon
public
32. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
private
variables
auto
t
33. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
classes
scope resolution operator
n
named constant
34. C++ programs are normally typed into a computer using a(n) ________ program.
initialized
like-type expression
editor
Semicolon
35. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
associations
cin >> variable
unary operator
fixed
36. A human readable file that contains C++ program
Sentinel
source file
function prototype
main
37. Whole numbers - no decimals and no commas included
int values
% modulus
definition
t
38. To explicitly indicate that a value is to be converted to another type
static
public
main
type casting (conversion)
39. int namespace include using return examples of ___________
if...else
syntax
reserve words
prompt
40. A C++ statement that makes a decision is ______.
if
unary operator
Preprocessor
strcmp()
41. tab
escape sequences
definition
t
subscript (or index)
42. __________ can be used to assign an object of a class to another object of the same class.
Default memberwise assignment
operand value
like-type expression
preprocessor
43. A function is invoked with a ________.
% modulus
int values
function parameters
function call
44. 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.
/n
function prototype
assignment
Counter-controlled or definite
45. For a local variable in a function to retain its value between calls to the function it must be declared with the ________ storage-class specifier.
loader
return
static
public
46. For every opening brace in a C++ program there must be a ______________.
void
Closing brace
public
prompt
47. The ________ qualifier is used to declare read-only variables.
strcpy()
const
const datatype identifier = value
function call
48. Message displayed to the screen asking user for input; generated with an output statement
Default memberwise assignment
private
getline
prompt
49. A nonmember function must be declared as a(n) __________ of a class to have access to that class's private data members.
friend
associations
static
opened
50. All C++ Variables are_________.
semantics
Preprocessor
case sensitive
associations