1. (TCO 13) Text files are what type of file? (Points : 4)
2. (TCO 13) What do the following statements accomplish?
theFile.open( myFile.txt , ios::in); (Points : 4)
Opens myFile in read mode
Opens myFile in append mode
Creates an empty file named myFile
Opens a file in input mode to write to
3. (TCO 13) When a file is opened in the append mode, the file pointer is positioned _____. (Points : 4)
at the end of the file
at the beginning of the file
in the middle of the file
after the file header
4. (TCO 13) The is_closed function returns what kind of data type? (Points : 4)
5. (TCO 12) Which is not a reason that pointers are valuable? (Points : 4)
Pointers allow for faster access to array elements.
Pointers speed the process of passing objects like classes to functions.
Pointers allow function to be passed as an argument to other functions.
Pointers involve a great deal of overhead when used in conjunction with arguments.
6. (TCO 11) N-1 is the _____. (Points : 4)
first position of an array
position of Row
position of Column
last position of an array
7. (TCO 11) When working with an array, the easiest way to traverse or visit all elements of the array is to _____. (Points : 4)
use a loop statement
sort the array and read it
do a binary search
use sequential coding
8. (TCO 11) In the following array, what is the value of table?
(Points : 4)
9. (TCO 10) To halt the execution of a program at a specific spot during debugging, you must use a _____. (Points : 4)
scope resolution operator
10. (TCO 9) The procedures that the object performs are known as _____. (Points : 4)
11. (TCO 9) The class _____ starts with the word “Class” followed by the name of the class. (Points : 4)
12. (TCO 9) The mutator methods are sometimes called _____. (Points : 4)
None of the above
13. (TCO 9) Which method is called automatically when an object is created? (Points : 4)
14. (TCO 8) A value that is part of a function header is called a(n) _____. (Points : 4)
15. (TCO 7) What is wrong with this call statement?
PrintName(string name); (Points : 4)
It is missing void.
The data type should be removed.
The semicolon should be removed.
Nothing is wrong with it.
1. (TCO 7) A variable’s visibility indicating where in the program the variable can be used is called _____. (Points : 4)
2. (TCO 7) Why is it not necessary to return a variable from a function if the variable is declared as global? (Points : 4)
You have to return all variables regardless of scope.
All functions can see and access global variables.
main() gets copies of global variables.
Each function gets its own copy of global variables.
3. (TCO 6) Debugging is like being a(n) _____. (Points : 4)
4. (TCO 5) Float and double variables should not be used _____. (Points : 4)
to perform mathematical calculations
as approximate representations of decimal numbers
for applications when precision is required
5. (TCO 5) The most difficult aspect of working with _____ loops is keeping track of the separate loop control variables that direct the program’s execution. (Points : 4)
6. (TCO 5) How many times will this for loop execute?
for(int i = 0; i < 10; --i) (Points : 4) 0, the loop will not execute 9 10 It is an infinite loop. 7. (TCO 4) Input values should always be checked for _____. (Points : 4) appropriate range reasonableness division by zero if division is taking place All of the above 8. (TCO 4) Consider the following segment of code. if(apple = 5) cout<<"You got \"five\" apples!"<
14. (TCO 1) Which of the following statements about IDE is true? (Points : 4)
IDE provides editing, compiling, and debugging in one software package.
IDE only allows programmers to edit their code.
Visual Studio.Net is not an IDE.
IDE stands for integrated development engine.
15. (TCO 2) The following program displays: _____.
using namespace std;
cout << "We like\"CIS170\""; return 0; } (Points : 4) We like CIS170 We like CIS170c We like \ CIS170\ We like “CIS170 “ 1. (TCO 3) What is the output of the following program? #include
using namespace std;
int x1, x2, i, j, k, y, z;
x1 = 1;
x2 = 1;
y = 5 + x1–;
z = 5 + ++x2;
i = 6 % 4;
j = 1;
j += j + 3;
k = 25 / 2;
f = (float)((2 / 5) * k);
cout<<"x1 is "<
* You can also use 2CO option if you want to purchase through Credit Cards/Paypal but make sure you put the correct billing information otherwise you wont be able to receive any download link.
* Your paypal has to be pre-loaded in order to complete the purchase or otherwise please discuss it with us at firstname.lastname@example.org.
* As soon as the payment is received, download link of the solution will automatically be sent to the address used in selected payment method.
* Please check your junk mails as the download link email might go there and please be patient for the download link email. Sometimes, due to server congestion, you may receive download link with a delay.
* All the contents are compressed in one zip folder.
* In case if you get stuck at any point during the payment process, please immediately contact us at email@example.com and we will fix it with you.
* We try our best to reach back to you on immediate basis. However, please wait for atleast 8 hours for a response from our side. Afterall, we are humans.
* Comments/Feedbacks are truely welcomed and there might be some incentives for you for the next lab/quiz/assignment.
* In case of any query, please donot hesitate to contact us at firstname.lastname@example.org.
* MOST IMPORTANT Please use the tutorials as a guide and they need NOT to be used for any submission. Just take help from the material.
******************************************** Good Luck ***************************************************
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.