Professional Documents
Culture Documents
Constructor
Destructor
Constitutor
2. To include code from the library in the program, such as iostream, a directive would
be called up using this command.
include (iostreamh)
include #iostream,h;
3. Single line comments explaining code would be preceded like in the following
example
/**
//
*//
/*
5. What punctuation must each command line have at the end of the line ?
Generated by Foxit PDF Creator © Foxit Software
http://www.foxitsoftware.com For evaluation only.
case-sensitive.
Not case-sensitive.
It depends
None of these
int
long
double
float
string mystr;
string mystr[20];
string[20] mystr;
char mystr[20];
10
11
12
13
Generated by Foxit PDF Creator © Foxit Software
http://www.foxitsoftware.com For evaluation only.
10. When you are creating a structure, you need to use the following keyword
structure
struct
object
record
11. Select the correct function definition (NOT prototype) from the list below.
void intro();
12. Cout can print multiple values or variables in a single command using the following
syntax:
It allows the programmer to use cout << It defines the statement return
15. Which of the following converts an integer "value" to its ASCII equivalent ?
atoi(value)
(char) value
char (value)
bool
int
real
double
17. Which one of the choices would produce the following output ?
0123456789
0 2 4 6 8 10 12 14 16 18
1010101010
0101010101
22
Generated by Foxit PDF Creator © Foxit Software
http://www.foxitsoftware.com For evaluation only.
12
error
23
20. For which values of the integer _value will the following code become an infinite
loop?
int number=1;
while (true) {
cout << number;
if (number == 3) break;
number += _value; }
only 0
only 1
only 2
only 1 or 2