n=1;
while (n<= 5)
cout <
Select one:
a. pre-test loop
b. post-test loop
c. null statement
d. infinite loop
e. None of these
Select one:
a. break
b. terminate
c. re-iterate
d. continue
e. None of these
Select one:
a. is false
b. is true
c. does not evaluate to true or false
d. evaluates to true or false
e. None of these
Select one:
a. constant
b. counter
c. control statement
d. null terminator
e. None of these
int number= 6;
number++;
cout <
int number= 6;
int x=0;
x=–number;
cout <
Select one:
a. name
b. number
c. buffer
d. segment
e. None of these
dataFile.close();
Select one:
a. is illegal in C++
b. needs a filename argument to execute correctly
c. closes a file
d. is legal but risks losing valuable data
e. None of these
int x=0;
for(int count=0; count<3; count++)
x+=count;
cout <
Select one:
True
False
Select one:
a. int array[0];
b. float $payments[10];
c. void numbers[5];
d. int array[10];
e. None of these
Select one:
a. all dimensions
b. all but the first dimension
c. the size declarator of the first dimension
d. all element values
e. None of these
Select one:
a. number, one
b. number, zero
c. constant integer expression, zero
d. variable, -1
e. None of these
Select one:
a. can be set at runtime
b. can begin with a programmer-defined value
c. varies from program to program
d. begins with zero
e. None of these
Select one:
a. counter variable
b. i variable
c. iterator
d. range variable
e. None of these
Select one:
a. one
b. two
c. four
d. Any of these
e. None of these
Select one:
a. legal in C++
b. illegal in C++
c. automatically furnished one element, with a value of zero
d. automatically furnished one value—the null terminator
e. None of these
Select one:
a. illegal in C++
b. legal in C++
c. not recommended by the ANSI committee
d. not good programming practice
e. None of these
87
66
55
)
int numbers={99,87,66,55,101};
for (int i=1; i<4; i++)
cout<
int numbers[4]={99,87};
cout<
Select one:
a. int vector n ({10}, {20});
b. vector
c. vector
d. vector n
vector
Select one:
a. It creates a vector object with a starting size of 2 and the first element initialized with the value 10.
b. It creates a vector object and initializes all the first two elements with the values 10 and 2.
c. It creates a vector object with a starting size of 10 and the first element initialized with the value 2.
d. It creates a vector object with a starting size of 10 and all elements are initialized with the value 2.
Select one:
True
False
Select one:
a. fstream
b. cfile
c. file
d. fileaccess
Select one:
a. cout object
b. pen object
c. output object
d. stream insertion operator
e. None of these
Select one:
a. outputFile
b. fstream
c. ifstream
d. ofstream
)
Select one:
a. ifstream
b. fstream
c. ofstream
d. inputFile
Select one:
a. outFile << number; b. write(outFile, number); c. outFile >> number;
d. number >> outFile;
Select one:
a. closed
b. opened
c. buffered
d. initialized
e. None of these