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 program that finds and attaches to your program the indicated libraries for compilation
virtual functions
?
preprocessor
sorting
2. C++ programs are normally typed into a computer using a(n) ________ program.
::
searching
strcmp()
editor
3. Lists and tables of values can be stored in arrays or __________.
named constant
member
initialized
vectors
4. The ________ statement in a called function passes the value of an expression back to the calling function.
return
sorting
//
pointer
5. A pointer is a variable that contains as its value the____________ of another variable.
address
delete
*
const datatype identifier = value
6. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
void
integer operands
Unified Modeling Language(UML)
if...else
7. Naming convention for C++ programs
void
.cpp
data type
recursive function
8. The process of placing the elements of an array in order is called ________ the array.
escape sequences
strcmp()
function scope
sorting
9. Class members specified as _________ are accessible anywhere an object of the class is in scope.
strcpy()
public
Unified Modeling Language(UML)
before
10. The sign you use for references
::
derived class
&
rand
11. data types that refer to numbers with decimals
if...else
setw
floating-point
initialized
12. A __________ data member represents class-wide information.
{ }
global
getline
static
13. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
selection
cmath
void
mixed expression
14. These are data items whose values do not change while the program is running
Literals
new line
&
pointer
15. 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.
operator overloading
function call
>>
?
16. Sets floating-point values to a fixed decimal format
classes
function parameters
assignment
fixed
17. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
function prototype
semicolon
beginning
allocating memory
18. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
mixed expression
unary operator
base class
new line
19. Used to qualify hidden names so that they can be used.
heap
scope resolution operator
friend
this
20. This happens when too much memory is pushed onto the stack and overflows to other areas of memory.
Stack overflow
cin >> variable
searching
function prototype
21. You can reassign the operator features in C++ to do things other than what they would do naturally. This is called ____________
heap
member
operator overloading
data type
22. It is possible to have various functions with the same name that operate on different types or numbers of arguments. This is called function ________.
member
overloading
mixed expression
case sensitive
23. Operator with only one operand
whitespace
function prototype
unary operator
assignment
24. A function that calls itself either directly or indirectly - through another function) - is a ________ function.
recursive
endl (same as 'n')
<<
const
25. Every C++ statement ends with a(n) _________.
break
semicolon
overloading
access specifier
26. Comments do not cause the computer to print the text after the____ on the screen when the program is executed.
//
semicolon
.cpp
&
27. A __________ should be used to declare the size of an array because it makes the program more scalable.
recursive function
setw
constant variable
mixed expression
28. Allows the programmer to store a value in a variable
assignment statement
special symbols
binary operator
cout
29. To explicitly indicate that a value is to be converted to another type
token
globals
arithmetic expression
type casting (conversion)
30. A ________ program executes before the compiler's translation phase begins.
return
preprocessor
//
stack
31. The three values that can be used to initialize a pointer are 0 - __________ and an address.
stack
NULL
member
cmath
32. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
assignment statement
#include
base
friend
33. The modulus operator (%) can be used only with __________.
assignment
integer operands
constant variable
strlen()
34. Syntax for named constant declaration
address
auto
const datatype identifier = value
rand
35. Storage-class specifier ________ is a recommendation to the compiler to store a variable in one of the computer's registers.
void pointer
Literals
register
int values
36. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
associations
editor
semantics
token
37. A member function should be declared static if it does not access __________ class members.
opened
t
scope
non-static
38. Preprocessor directive syntax
/n
mixed expression
#include <headerfilename>
void pointer
39. Nonexecutable statements that are included in a program to provide information about what the program does etc.
object-oriented analysis and design (OOAD)
assignment
comments
recursive
40. Keyword public is a(n) _________
reserve words
access specifier
#include
classes
41. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
function scope
#include
subscript (or index)
function overloading
42. 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.
Sentinel
scope resolution operator
preprocessor
delete
43. A constant object must be __________; it cannot be modified after it is created.
char
initialized
&
object-oriented analysis and design (OOAD)
44. The ________ of an identifier is the portion of the program in which the identifier can be used.
pointer
scope
function overloading
Default memberwise assignment
45. A type of pointer that can point at objects of any data type.
overloading
continue
editor
void pointer
46. Compares two strings and returns 0 if they are equal.
new line
token
strcmp()
inheritance
47. A filestream variable that represents the default output device
unary scope resolution operator (::)
cout
editor
?
48. A memory location with a name and data type and a value - its content (value) cannot be changed during program execution
Closing brace
named constant
t
/n
49. The ________ qualifier is used to declare read-only variables.
NULL
const
rand
classes
50. The address-of operator. it is used to assign pointers and to print the address of variables.
attributes
initialized
&
stack