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. Names of things that are used in a program - can apply to variables & constants and functions
return
public
escape sequences
identifiers
2. The symbol for the binary scope resolution operator
inline functions
initialized
subscript (or index)
::
3. C++ programmers concentrate on creating ________ which contain data members and the member functions that manipulate those data members and provide services to clients.
type coercion
cin
classes
a.out
4. Lists and tables of values can be stored in arrays or __________.
beginning
vectors
a.out
local variable
5. A type of pointer that can point at objects of any data type.
void pointer
type casting (conversion)
function prototype
vectors
6. Forces the computer to display decimal point and trailing zeroes
showpoint
Stack overflow
operator
semicolon
7. For every opening brace in a C++ program there must be a ______________.
static
operator
Closing brace
global
8. A __________ data member represents class-wide information.
static
a.out
cout
void
9. The storage-class specifiers are mutable - auto - ________ - extern and static.
% modulus
new line
Arithmetic Operators
register
10. Function ________ is used to produce random numbers.
linker
polymorphism
void pointer
rand
11. Syntax for reading char type variables by extracting one nonwhitespace character extracted at a time
Stack overflow
cin >> variable
arithmetic expression
register
12. You must have a ___________ for every variable you intend to use in a program
public
attributes
dot (.)
definition
13. A function is invoked with a ________.
binary operator
function call
recursive
.cpp
14. Nonexecutable statements that are included in a program to provide information about what the program does etc.
classes
comments
function overloading
public
15. The idea that you can call the same function and the output will depend on the type of object you're using.
cin >> variable
polymorphism
?
vectors
16. To explicitly indicate that a value is to be converted to another type
type casting (conversion)
&
prompt
scope resolution operator
17. A function that calls itself
recursive function
Counter-controlled or definite
//
switch
18. 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
19. Return type _________ indicates that a function will perform a task but will not return any information when it completes its task.
case sensitive
void
editor
searching
20. Default name of executable file
a.out
return
unary operator
before
21. The three values that can be used to initialize a pointer are 0 - __________ and an address.
arithmetic expression
if...else
int values
NULL
22. Used for function calls and local variables
stack
//
information hiding
public
23. To write data to a file you define an object of which one of the following
pointer
template
ofstream
strlen()
24. Class members specified as _________ are accessible anywhere an object of the class is in scope.
unary operator
overloading
unary scope resolution operator (::)
public
25. Executable version of program
object file
preprocessor
subscript (or index)
switch
26. All programs can be written in terms of three types of control structures:Sequence - ________and Repetition.
cin >> variable
a.out
globals
selection
27. The ________ program combines the output of the compiler with various library functions to produce an executable image.
inheritance
cin
linker
//
28. __________ can be used to assign an object of a class to another object of the same class.
#include <headerfilename>
Default memberwise assignment
operator
semantics
29. The ________ of an identifier is the portion of the program in which the identifier can be used.
scope
register
base
new line
30. Returns the length of a string excluding the null terminator.
strlen()
syntax
cin >> variable
Preprocessor
31. Class members specified as _________ are accessible only to member functions of the class and friends of the class.
delete
private
char
globals
32. A memory location with a name and data type - its content may be changed during program execution
variable
arithmetic expression
selection
linker
33. A set of values together with a set of operations
Literals
data type
access specifier
reserve words
34. The stream extraction operator
>>
variables
.cpp
Closing brace
35. Operator with two operands
if...else
rand
//
binary operator
36. Naming convention for C++ programs
void pointer
#include directive
.cpp
#include
37. All ______ must be declared before they are used.
variables
fstream
template
?
38. Compares two strings and returns 0 if they are equal.
continue
left
recursive
strcmp()
39. Allows the programmer to store a value in a variable
/n
cin.get(ch)
assignment statement
loader
40. A variable that holds the address of another variable.
cmath
Preprocessor
void
pointer
41. The sign you use for references
strcpy()
&
inheritance
initialized
42. 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.
derived class
case sensitive
recursive function
continue
43. An expression that has operands with different data types
mixed expression
derived class
type casting (conversion)
public
44. Single letters or digits or special symbols; enclose value in single quotes ('a' '?' '8')
char
default constructor
{ }
function call
45. An array that uses two subscripts is referred to as a(n) _________ array.
{ }
main
two-dimensional
*
46. Function _________ from the <string> library reads characters until a newline character is encountered - then copies those characters into the specified string.
stack
const datatype identifier = value
&
getline
47. The stream insertion operator
//
auto
<<
function call
48. C++ programs are normally typed into a computer using a(n) ________ program.
auto
editor
Semicolon
case sensitive
49. A function that can be used to read character data including whitespace
scope resolution operator
identifiers
cin.get(ch)
<<
50. Used for dynamically allocated variables
ofstream
syntax
return
heap