CIS170 Solved Final Exam in C# – Previous Exam – 22 MCQs, 6 Essay Questions – Guaranteed 100% score

Lab Price = $23
Please feel free to send us your queries at: support@iqrajavaid.com
Payment methods

Add to Cart

Buy Now

View Cart


Problem Statement

1. (TCOs 1, 6) Because information in _____ is lost when the power is turned off, that type of memory is considered to be _____.
auxiliary storage, nonvolatile
auxiliary storage, volatile
RAM, nonvolatile
RAM, volatile

2. (TCOs 1, 6) What does IDE stand for?
Interior Design Environment
Integrated Development Environment
Integrated Design Environment
Interior Development Environment

3. (TCOs 1, 6) Which keyboard function key do we use to compile and run a C# program within Visual Studio.NET?
F5
F11
F10
F1

4. (TCOs 2, 3) A computer uses the _____ numbering system to represent and manipulate data.
binary
decimal
hexadecimal
octal

5. (TCOs 2, 3) The proper operator precedence, from first to last, is _____.
subtraction, addition, and multiplication
addition, subtraction, and multiplication
exponentiation, division, and subtraction
exponentiation, addition, and division
exponentiation, division, and multiplication

6. (TCOs 2, 3) Your C# program needs to store a single alphanumeric character the user will enter. When your program starts, the default setting for that character should be the letter A. You implement this functionality by writing _____.

char myVar = A;
char myVar = ‘A’;
char myVar(‘A’);
char myVar(A);

7. (TCO 4) The following C# code _____ compile; however, it contains a _____ error.
int x = 15, y = 10;
if (x < y); Console.WriteLine("x is less than y"); will, compiler will, logical will not, compiler will not, logical 8. (TCO 4) Which part of this expression will be evaluated first? if (b <= c && d >= e)

b <= c c || d d >= e
if()

9. (TCO 5) Your program keeps asking for input from the user. If there is more input, the user types “Y” after entering the data. If there is no more input, he/she enters “N.” In this context, “Y” and “N” are used as _____.
accumulators
counters
integer data types
sentinel values

10. (TCO 5) In this code, the variable _____ is a counter and the variable _____ is an accumulator.
double sum = 0, height = 2.0, stop =10, max = 50;
int track = 0, num = 0;
while (num <= stop) { sum = sum + height * num; if (sum <= max) track++; num++; } num, track sum, track track, sum height, stop 11. (TCOs 7, 8) Which is a predefined C# method? Console.PrintLine(); Console.Print(); Math.Sum(); Math.Sin(); 12. (TCOs 7, 8) Which is a valid overloaded version of the following method? float DetermineResults(float num1, float num2) float DetermineResults(double num1, float num2) float DetermineTheResults(float num1, float num2) void DetermineResults(float num1, float num2) double DetermineResults(float num1, float num2) 13. (TCOs 7, 8) Because Main() and MyFunction() store counter in _____, the output of this code will be _____. static void Main() { int counter = 8; Console.Write("{0} ", counter); counter++; MyFunction(counter); counter++; Console.Write("{0} ", counter); Console.Read(); } public static void MyFunction(int counter) { Console.Write("{0} ", counter); counter++; } different memory locations, 8 9 10 the same memory location, 8 9 10 different memory locations, 8 9 11 the same memory location, 8 9 11 14. (TCOs 9, 10) Which of the following is not good programming practice? Indenting the statements in the body of each control structure Using integer types for loop control variables Left-aligning nested repetition structures Placing vertical spacing above and below control structures 15. (TCOs 9, 10) In Figure 1, objectB is a _____ and objectC is a _____.

CheckBox, Form
Checkbox, MenuStrip
RadioButton, Form
RadioButton, MenuStrip

16. (TCOs 9, 10) When the user of your flight reservation GUI selects the “checkBoxAirGhana” CheckBox, the string “AirGhana” should appear in the “listBoxOrder” ListBox. To implement this functionality, write _____ in the ckBoxAirGhana_CheckedChanged() event handler.

if (ckBoxAirGhana.Checked == true)
{
listBoxOrder.Items.Add(“AirGhana”);
}

if (ckBoxAirGhana.Checked)
{
listBoxOrder.Add(“AirGhana”);
}

if (ckBoxAirGhana.Checked == true)
{
listBoxOrder.Text = “AirGhana”;
}

if (ckBoxAirGhana.Checked)
{
listBoxOrder.AddText(“AirGhana”);
}

17. (TCOs 11, 12) To pass the entire myInfo array to the PrintElements method, replace the commented line below with _____.
static void Main()
{
int[] myInfo = {6,7,8,9};
//call PrintElements
}
public static void PrintElements(params int[] item)
{
for (int i=0; i

Image Description
(Points : 20)

5. (TCO 2) Although the following code compiles and runs, the programmer made some major readability errors. Describe at least three changes that would make it easier for other programmers to read and understand the code.
class Program
{
static void Main() //main
{
int a;
int Float = 10; // ints
for(int i = 0;i < Float;i++) /* loop */{ a=method(i); Console.WriteLine(a); } Console.Read(); //read } public static int method(int a) /*method*/ { return (int)(Math.Pow((double)a,2.0)); } } (Points : 20) 6. (TCO 11) Write a C# program to store an array of integers 10 through 19. Use an appropriate loop to multiply all of the values in the list. Print out the result. (Points : 20)

Relevant Material
Instructions
* If you want to purchase multiple products then click on “Buy Now” button which will give you ADD TO CART option.Please note that the payment is done through PayPal.
* 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 support@iqrajavaid.com.
* 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 support@iqrajavaid.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 support@iqrajavaid.com.
* 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 ***************************************************
Privacy Policy
We take your privacy seriously and will take all measures to protect your personal information.
Any personal information received will only be used to fill your order. We will not sell or redistribute your information to anyone.
Refund Policy
Incase you face any issues with the tutorial, please free to contact us on support@iqrajavaid.com
We will try our best to resolve the issue and if still persists we can discuss for a refund in case its required.
Payment Details
Lab Price = $23
Please feel free to send us your queries at: support@iqrajavaid.com

Payment methods

Add to Cart

Buy Now

View Cart

Leave a Reply