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. Type casting syntax
unary operator
static_cast<char>(65)
token
attributes
2. To write data to a file you define an object of which one of the following
ofstream
register
void
function prototype
3. 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.
static
static_cast<char>(65)
main
continue
4. 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.
information hiding
operator
#include <headerfilename>
strlen()
5. A variable that holds the address of another variable.
if...else
heap
new line
pointer
6. The six possible scopes of an identifier are ________ - file scope - block scope - function-prototype scope - class scope - namespace scope .
binary operator
static_cast<char>(65)
function scope
opened
7. A memory location with a name and data type - its content may be changed during program execution
variable
variables
static
mixed expression
8. When the compiler sees this keyword the function call is replaced with a copy of the contents of the function itself.
vectors
#include
inline functions
break
9. A function is invoked with a ________.
prompt
pointer
default constructor
function call
10. The elements of an array are related by the fact that they have the same name and ___________.
type
operator
break
unary operator
11. A filestream variable that represents the default output device
cout
t
Counter-controlled or definite
strcpy()
12. Repeating a set of instructions a specific number of times is called_________repetition.
showpoint
Counter-controlled or definite
?
pointer
13. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
n
private
object file
stack
14. A file must be ________ before data can be written to or read from it.
Semicolon
opened
return
semicolon
15. The source-code file and any other files that use a class can include the class's header file via an _________ preprocessor directive.
data type
&
#include
object-oriented analysis and design (OOAD)
16. The sign you use for references
&
break
static_cast<char>(65)
?
17. A________ allows the compiler to check the number & types and order of the arguments passed to a function.
scope resolution operator
if...else
function prototype
classes
18. The ________ statement in a called function passes the value of an expression back to the calling function.
return
ofstream
type coercion
heap
19. Executable version of program
overloading
template
object file
dot (.)
20. Associate an identifier with a memory location
local variable
address
NULL
allocating memory
21. The _________ begins the body of every function and the _________ ends the body of every function.
arithmetic expression
default constructor
assignment
{ }
22. The ________ program transfers the executable image of a C++ program from disk to memory.
escape sequences
Default memberwise assignment
loader
0
23. Operator with only one operand
#include
integer operands
unary operator
vectors
24. Whole numbers - no decimals and no commas included
function parameters
cin
int values
variable
25. Used for function calls and local variables
loader
cin
auto
stack
26. A program that finds and attaches to your program the indicated libraries for compilation
&
arithmetic expression
preprocessor
void pointer
27. 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.
Unified Modeling Language(UML)
return
static
vectors
28. int namespace include using return examples of ___________
dot (.)
selection
void
reserve words
29. Two slash marks ( // ) indicate __________ of a comment
global
beginning
t
reserve words
30. When a value of one data type is implicitly (automatically) changed to another data type
special symbols
type coercion
void
fixed
31. This manipulator causes the field to be left-justified with padding spaces printed to the right.
definition
operand value
left
Sentinel
32. A function that can be used to read character data including whitespace
unary scope resolution operator (::)
cin.get(ch)
member
beginning
33. Program components in C++ are called functions and ________.
recursive
#include
fixed
classes
34. The address-of operator. it is used to assign pointers and to print the address of variables.
function prototype
&
switch
showpoint
35. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
before
data type
void
object file
36. Grammar rules of the language; compiler will try to identify and locate syntax errors
operator
operand value
inheritance
syntax
37. Smallest individual unit of a programming language - special symbols or word symbols or identifiers
token
object file
member
opened
38. The ________ qualifier is used to declare read-only variables.
overloading
const
case sensitive
char
39. The escape sequence n represents the _________ character which causes the cursor to position to the beginning of the next line on the screen.
auto
new line
global
function scope
40. A function that calls itself
new line
public
scope resolution operator
recursive function
41. Naming convention for C++ programs
Sentinel
.cpp
virtual functions
template
42. Header file that contains commonly performed mathematical functions
cmath
type coercion
scope resolution operator
identifiers
43. Can be used as a compound "if" statement. it includes a number of different possibilities and directions rather than a single test.
before
auto
switch
>>
44. A function ________ enables a single function to be defined to perform a task on many different data types.
Default memberwise assignment
before
pointer
template
45. Used to qualify hidden names so that they can be used.
initialized
scope resolution operator
constant variable
classes
46. The _____ causes the contents of another file to be inserted into a program.
#include directive
srand
non-static
stack
47. Forces the computer to display decimal point and trailing zeroes
selection
&
showpoint
assignment statement
48. An expression that has operands with different data types
main
mixed expression
Arithmetic Operators
//
49. A filestream variable that represents the default input source
cin
function overloading
/n
case sensitive
50. This is used to mark the end of a complete C++ programming statement.
return
Semicolon
whitespace
/n