

























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


























th
DO NOT START UNTIL INSTRUCTED TO DO SO. YOU WILL LOSE POINTS IF YOU START WORKING ON THE TEST BEFORE WE TELL YOU. THIS IS A 150 MINUTE EXAM.
Name: Discussion Section: TA:
Use only a #2 pencil; otherwise, your exam won't be graded. Bubble in the Form Letter above!!! Bubble in your name and your NetID !!! Write your TA's name (of the section you attend) in the instructor slot and your section number in the section slot. Your section number is in the table provided at the bottom of this page.
The exam consists of 33 pages. Check that your copy is complete, and ask for a replacement if it is not. Make sure you look at all the pages. You will have 2 hours and 30 minutes to FILL IN THE SCANTRON for the exam. You may not use any books, notes, or other references for this exam. NO QUESTIONS WILL BE ANSWERED DURING THE EXAM. At the end of the exam, stop writing and put down your pencil when time is called. Hand in both the scantron and all the pages of the exam booklet. NO CALCULATORS OR ELECTRONIC DEVICES OF ANY KIND ARE ALLOWED. TURN OFF CELL PHONES AND PAGERS. IF A CELL PHONE RINGS, DO NOT ANSWER IT!!
Discussion section numbers and name of the TA whose lab you attend:
Time Wednesday Thursday Friday 9:00 am 105 – Ankeeth 113 – Damion 10:00 am 106 – Ankeeth 114 – Damion 11:00 am 107 – Aditya 115 – Yi-Shuan 12:00 pm 108 – Aditya 116 – Yi-Shuan 1:00 pm 109 – Chaitanya 117 – Ankit 2:00 pm 101 – Minas 110 – Chris 118 – Ankit 3:00 pm 102 – Minas 111 – Chris 119 – Chaitanya 4:00 pm 103 – Boonrod 112 – Bhagath 5:00 pm 104 – Onur
1. Always choose one answer, the most correct **choice of the answers offered.
a. DVD/CD-RW Drive b. SQLYog c. Hard Drive d. Keyboard
equal sign “=” to denote logical equivalence)?
a. A = NOT(NOT A) b. NOT(A OR B) = (NOT A) AND (NOT B) c. A = A AND A d. A OR B = A AND B
a. The work done by a CPU. b. A named collection of data that exists on a storage medium. c. A hardware storage device. d. Precisely those computer programs that are not currently running on a computer.
a. 101010 b. 110011 c. 111111 d. 101101
a. 93 b. 89 c. 59 d. 25
Use the following diagram for the NEXT question.
a. A = 1 and B = 1 b. A = 1 and B = 0 c. A = 0 and B = 1 d. A = 0 and B = 0
Use the following figure for the NEXT question.
a. Name box Fill handle Active cell Formula bar b. Name box Formula bar Fill handle Active cell c. Active cell Formula bar Fill handle Name box d. Active cell Fill handle Formula bar Name box
Use the following figure for the NEXT THREE questions.
cell B6?
a. =SUM(B5,B4,B3,B2)/ b. =SUM(B2:B5)/COUNT(B1:B5) c. =AVERAGE(B2:B5) d. =(B$2+B$3+B$4+B$5)/COUNTA(B1:B5)
a. 1 b. 2 c. 3 d. 4
a. 140 b. 141 c. 175 d. 181
Use the following screenshot for the NEXT question.
a. B b. B c. B d. B
Use the following figure for the NEXT question.
a. 75 b. 77 c. 65 d. 90
Use the following figure for the NEXT question.
a. =VLOOKUP(B2,B5:D8,3) b. =VLOOKUP(B2,B5:D8,2) c. =HLOOKUP(B2,B5:D8,3) d. =VLOOKUP(B2,C5:D8,2)
a. =IF(A1<10, IF(A1>5, 0, 1), 0) b. =IF(A1>5, IF( A1<10, 1, 0), 0) c. =IF(AND(A1<10, A1>5), 1, 0) d. =IF(OR(A1<=5, A1>=10), 0, 1)
a. = A2 + B b. = A2 + Surcharge!B c. = A2 + 'Surcharge'!B d. = Price!A2 + B
Cells(1, 2).Value = ActiveCell.Row Cells(4, 5).Value = ActiveCell.Column
a. A2 = 3 E4 = 7 b. A2 = 7 E4 = 3 c. B1 = 7 D5 = 3 d. B1 = 7 E4 = 3
statement below select?
ActiveCell.Offset(2,0).Range("A1:B2").Select
a. 1 b. 2 c. 3 d. 4
a. It is a module level variable. b. It stores an integer. c. It needs to be declared in every subprocedure. d. Its value can be changed in any subprocedure.
Use the following code fragment to answer the NEXT question. (Remember the course convention for declaring variables.)
Public Function MonthName(intChoice As Integer) As String
a. MonthName(5) = intMonth b. strName = MonthName("Jan") c. intMonth = MonthName(5) d. strName = MonthName(5)
Use the following two code fragments to answer the NEXT question.
Select Case intNumber Case 1, 2, 3, 4 MsgBox "Green" Case Is < 10 MsgBox "Blue" Case Else MsgBox "Red" End Select
If intNumber < 5 Then MsgBox "Green" ElseIf intNumber < 10 Then MsgBox "Blue" Else MsgBox "Red" End If
TRUE regarding the two code fragments?
a. For some integer values, the IF statement will display a Message Box while the CASE statement will not display anything. b. They will never display the same Message Boxes for any value of intNumber. c. For some integer values, they will display different Message Boxes. d. They will always display the same Message Boxes for any value of intNumber.
Use the following code fragment for the NEXT question.
Dim intCounter As Integer intCounter = 1 Select Case intCounter Case Is <= 1 Range("A1").Value = "CS105" Case 1 Range("A1").Value = "VBA" Case 2 Range("A1").Value = "SQL" Case Else Range("A1").Value = "EXCEL" End Select
a. CS b. VBA c. SQL d. EXCEL
Use the following code fragment for the NEXT question.
Private Sub cmdAnswer_Click() Dim vntAnswer As Variant
vntAnswer = InputBox("Please type your answer.", "Answer") If IsNumeric(vntAnswer) Or vntAnswer = "" Then MsgBox "Your answer is a number or empty" ElseIf vntAnswer <= 100 Then MsgBox "Your answer is equal to or less than 100" ElseIf vntAnswer = 100 Then MsgBox "Correct answer" Else MsgBox "Totally incorrect answer" End If End Sub
a. Your answer is a number or empty b. Your answer is equal to or less than 100 c. Correct answer d. Totally incorrect answer
a. If^ intCustomers^ >^50 Then MsgBox "Sorry, the restaurant is full." End If If intSize > 50 Then MsgBox "Sorry, our tables are not large enough." Else MsgBox "Welcome and enjoy your meal" End If b. If^ intCustomers^ >^50 Then MsgBox "Sorry, the restaurant is full." Else MsgBox "Welcome and enjoy your meal" End If If intSize > 50 Then MsgBox "Sorry, our tables are not large enough." Else MsgBox "Welcome and enjoy your meal" End If c. If^ intCustomers^ >^50 Then MsgBox "Sorry, the restaurant is full." ElseIf intSize > 50 Then MsgBox "Sorry, our tables are not large enough." Else MsgBox "Welcome and enjoy your meal" End If d. If^ intCustomers^ >^50 Then MsgBox "Sorry, the restaurant is full." If intSize > 50 Then MsgBox "Sorry, our tables are not large enough." Else MsgBox "Welcome and enjoy your meal" End If End If
Use the following code fragment for the NEXT question.
Dim intArr() As Integer Dim intN As Integer, intX As Integer, intI As Integer
intX = 0 intN = 4 ReDim intArr(1 To intN)
For intI = 1 To intN intArr(intI) = intI Next intI
For intI = 1 To intN intX= intX + intArr(intI) Next intI
a. 7 b. 8 c. 9 d. 10
Use the following code fragment for the NEXT TWO questions.
intSum = 0 For intRow = 1 To 10 Step 3 intSum = intSum + intRow Next intRow Range("A1").Value = intRow Range("A2").Value = intSum
a. 10 b. 35 c. 13 d. 22
a. 12 b. 22 c. 35 d. 40
Use the following code fragment to answer the NEXT question.
Sub cmdTable_Click() Dim intX As Integer Dim intY As Integer
For intX = 1 To 4 For intY = 1 To 4 Cells(intX, intY).Interior.Color = vbBlue Next intY Next intX End Sub
a. 4 b. 8 c. 16 d. 32
Use the following code fragment to answer the NEXT question.
For intX = 1 To 3 For intY = 1 To 4 Cells(intY, intX).Interior.Color = vbBlue Next intY Next intX
a. C b. D c. C d. D
Use the following code fragment for the NEXT question.
Sub cmdTable_Click() Dim intY As Integer Dim intX As Integer
For intX = 1 To 4 For intY = 1 To 4 Cells(intX, intY).Value = intX * intX * (-intY) Next intY Next intX End Sub
a. - b. - c. - d. 48
Use the following code fragment for the NEXT TWO questions.
1: Dim intA As Integer 2: Dim intB As Integer 3: intA = 1 4: Do While intA < 5 5: For intB = 1 to 5 Step 2 6: intA = intA + 1 7: Next intB 8: Loop 9: [A1].Value = intA
a. 3 b. 4 c. 5 d. 6
a. 4 b. 5 c. 6 d. 7