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. You can declare default values for a function in the ____________________.
Counter-controlled or definite
<<
{ }
function parameters
2. Used for dynamically allocated variables
{ }
new line
fixed
heap
3. A C++ statement that makes a decision is ______.
assignment
if
#include <headerfilename>
opened
4. A constant object must be __________; it cannot be modified after it is created.
non-static
&
global
initialized
5. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
identifiers
sorting
before
6. The process of analyzing and designing a system from an object-oriented point of view is called ________.
pointer
before
object-oriented analysis and design (OOAD)
constant variable
7. Preprocessor directive syntax
Literals
#include <headerfilename>
Sentinel
cmath
8. An expression that has operands with different data types
opened
function scope
base class
mixed expression
9. The_________selection statement is used to execute one action when a condition is TRue or a different action when that condition is false.
delete
Unified Modeling Language(UML)
srand
if...else
10. Naming convention for C++ programs
integer operands
.cpp
static
friend
11. The ________ statement in a called function passes the value of an expression back to the calling function.
getline
integer operands
return
comments
12. Every C++ program begins execution at the function _________.
main
reserved words
>>
operator overloading
13. * / % + -
Arithmetic Operators
selection
operator
NULL
14. If a member initializer is not provided for a member object of a class the object's __________ is called.
default constructor
void
strcpy()
scope resolution operator
15. Variables declared in a block or in the parameter list of a function are assumed to be of storage class ________ unless specified otherwise.
static_cast<char>(65)
fixed
auto
polymorphism
16. Program components in C++ are called functions and ________.
opened
operand value
classes
semicolon
17. = & | are examples of ____________.
auto
function parameters
special symbols
void pointer
18. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
inline functions
function overloading
{ }
Counter-controlled or definite
19. C++ programs are normally typed into a computer using a(n) ________ program.
searching
selection
opened
editor
20. Sets floating-point values to a fixed decimal format
fixed
const
setw
Semicolon
21. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
pointer
static_cast<char>(65)
escape sequences
cin >> variable
22. The ________ program transfers the executable image of a C++ program from disk to memory.
void pointer
semantics
binary operator
loader
23. Function ________ is used to produce random numbers.
rand
return
showpoint
data type
24. Class members specified as _________ are accessible anywhere an object of the class is in scope.
const datatype identifier = value
public
ofstream
const
25. A ________ program executes before the compiler's translation phase begins.
definition
strcmp()
preprocessor
non-static
26. The address-of operator. it is used to assign pointers and to print the address of variables.
&
operand value
0
Arithmetic Operators
27. The new operator dynamically allocates memory for an object of a specified type and returns a __________ to that type.
pointer
constant variable
friend
void pointer
28. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
polymorphism
function overloading
static_cast<char>(65)
getline
29. 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.
semantics
subscript (or index)
floating-point
?
30. Used to qualify hidden names so that they can be used.
base class
opened
scope resolution operator
Sentinel
31. Allows the programmer to store a value in a variable
auto
type casting (conversion)
assignment statement
classes
32. 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.
Literals
unary scope resolution operator (::)
/n
main
33. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
type
data type
static
34. The stream insertion operator
cout
associations
<<
scope
35. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
delete
inheritance
const
new line
36. A program that finds and attaches to your program the indicated libraries for compilation
#include
preprocessor
attributes
object-oriented analysis and design (OOAD)
37. Initializers __________ must be used to initialize constant members of a class.
classes
static
token
member
38. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
selection
object file
pointer
function parameters
39. The storage-class specifiers are mutable - auto - ________ - extern and static.
recursive function
register
#include directive
strlen()
40. 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
scope resolution operator
operator overloading
register
41. data types that refer to numbers with decimals
assignment
function call
linker
floating-point
42. All C++ Variables are_________.
editor
type coercion
case sensitive
cin >> variable
43. Default name of executable file
template
a.out
unary operator
scope resolution operator
44. int namespace include using return examples of ___________
reserve words
type
token
cin
45. When you create a ___________________in the base class and then call it using an object the function will know to look in the inherited class for the specifics of that function.
//
Counter-controlled or definite
type coercion
virtual functions
46. The three values that can be used to initialize a pointer are 0 - __________ and an address.
Arithmetic Operators
NULL
recursive function
non-static
47. ________ is a graphical language that allows people who design software systems to use an industry-standard notation to represent them.
Unified Modeling Language(UML)
cin >> variable
variables
cout
48. Forces the computer to display decimal point and trailing zeroes
object file
switch
before
showpoint
49. To write data to a file you define an object of which one of the following
Counter-controlled or definite
return
ofstream
variables
50. The ________ program combines the output of the compiler with various library functions to produce an executable image.
address
linker
base
register