Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. A procedure may not be accessed by procedures from another class or form if the __________ access specifier is used. a. Private b. Public

1. A procedure may not be accessed by procedures from another class or form if the __________ access specifier is used. a. Private b. Public c. Static d. Scope 2. By writing your own procedures, you can __________ an applications code, that is, break it into small, manageable procedures. a. streamline b. duplicate c. modularize d. functionalize 3. A is a special variable that receives a value being passed into a procedure or function. a. temporary variable b. pseudo-constant c. class-level variable d. parameter 4. Which of the following does not apply to procedures and functions? a. they help to break up a large body of code into smaller chunks b. they make it easier to maintain and modify code c. the execution time is significantly reduced by calling procedures and functions d. they permit the same sequence of code statements to be called from multiple places 5. When a parameter is declared using the __________ qualifier, the procedure has access to the original argument variable and may make changes to its value. a. ByValue b. ByAddress c. ByRef d. ByDefault 6. If you do not provide an access specifier for a procedure, it will be designated __________ by default. a. Private b. Protected c. Friend d. Public

Computer Science and Information Systems Spring 2018 7. Which of the following can be returned by a function? a. String values b. Integer values c. Boolean values d. All of the above 8. The operator performs string concatenation. a. ampersand (&) b. dollar sign ($) c. percent symbol (%) d. pound symbol (#) 9. The statement to declare strName as a variable that can hold character data is _______________. a. Dim strName As Text b. Dim strName As Single c. Dim strName As Word d. Dim strName As String 10. You can perform all of the following actions with variables except: a. Copy and store values entered by the user, so they may be manipulated b. Assign a variable's value to a constant c. Perform arithmetic on values d. Remember information for later use in the program 11. Which of the following is not a valid Visual Basic data type? a. Integer b. Number c. Decimal d. Short 12. Which of the following is not true in regard to naming variables? a. Names may contain underscores. b. Names may contain letters. c. Names may contain digits. d. Names may contain spaces. 13. If the Boolean expression A is True and B is False, the value of the logical expression A And B is __________. a. True b. False c. 1 d. 0 14. If the Boolean expression A is True and B is False, the value of the logical expression A Or B is __________. a. True b. False c. 1 d. 0 15. Which statement tests the value of an expression once and then uses that value to determine the result? a. Nested If b. If...Then...ElseIf c. If...Then d. Select Case 16. An If statement that appears inside another If statement is referred to as __________. a. nested b. embedded c. multi-level d. didactic 17. What value will be assigned to decCommission after the following code executes? Dim decMonthlySales, decCommRate, decCommission as Decimal decMonthlySales = 6500.00 Select Case decMonthlySales Case Is < 1000 decCommRate = 0.05 Case 1000 to 9999.99 decCommRate = 0.10 Case Is >= 10000 decCommRate = 0.15 End Select decCommission = decCommRate * decMonthlySales a. 0.00 b. 325.00 c. 650.00 d. 925.00 18. I the followig stateet that egis a ForNext loop, what is the purpose of the Step lause? For intX = 1 to 100 Step 5 a. It causes intX to be initialized to 5 when the loop begins. b. It causes the loop to end when intX is equal to 5. c. It causes intX to be incremented by 5 each time the loop repeats. d. It causes intX to be decremented by 5 each time the loop repeats. 19. Which of the following statements will assign a random number between 1 and 50 inclusive to intNum? a. intNum = rand.Next(50) + 1 b. intNum = rand.Next(1, 50) c. intNum = rand.Next(50) d. intNum = rand.Next() 20. What will be the final value of intCount? Dim intCount As Integer = 3 Do intCount += 6 Loop While intCount < 20 a. 20 b. 21 c. 15 d. 9 21. Values in an array are stored and worked with using a __________. a. method b. locator c. subscript d. element locator 22. In the array declaration below, what is the significance of the number 7? Dim strNames(7) As String a. It indicates the number of elements in the array. b. Its the upper bound (highest subscript value) of the array. c. Its the value assigned to the array elements. d. Its one greater than the upper bound of the array. 23. The lowest possible subscript of an array is __________. 0 1 1 There is no limit 24. When opening a file, use this method to determine whether a file exists before you attempt to open it: a. ExistFile(filename) b. IO.Exists(filename) c. System.IO.File.Exists(filename) d. System.File.Exists(filename) 25. The StreamReader objects __________ is used to determine when the end of the file has been reached. a. EndOfStream property b. Poke method c. EOF flag d. FileEnd flag 26. This control is used to display a standard Windows Open dialog box. a. OpenDialog b. OpenFileDialog c. OpenWindow d. OpenWindowDialog 27. The _______ method displays a dialog window when selecting a file that you want to open. a. DisplayDialogControl b. DisplayDialog c. ShowDialog d. ShowControl 28. When the PrintDocument controls Print method is executed, it triggers the __________ event. a. Printer b. PrintDoc c. PagePrint d. PrintPage 29. All of the following steps must be taken when a file is used by an application except ______. a. the file must be opened. If the file does not exist, the file will be created. b. the file must have a fully qualified path when opening the file. c. data is either written to the file or read from the file. d. when the application is finished using the file, the file is closed. 30. Which of the following statements are not true about text files? a. contains plain text b. cannot be viewed with an editor such as Notepad c. is the simplest type of data file d. known as a sequential-access file 31. When a file is selected from an Open dialog box, the path and file name are stored in the controls __________ property? a. Filename b. PathName c. File d. Item 32. This method is used to add more data to the end of an existing file. a. System.IO.File.OpenText b. System.IO.File.AppendText c. System.IO.File.CreateText d. System.IO.File.OpenNew 33. This method places an item of data in a file without terminating the line. a. WriteLine b. ReadLine c. Append d. Write 34. What does the following line do? Do Until inputFile.EndOfStream a. Checks to see if the file exists b. Checks to see if the next input is 1 c. Checks to see if the file is empty d. Checks to see if all the data in the file has been read

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Power Bi And Azure Integrating Cloud Analytics For Scalable Solutions

Authors: Kiet Huynh

1st Edition

B0CMHKB85L, 979-8868959943

Students also viewed these Databases questions