1. Trang chủ
  2. » Công Nghệ Thông Tin

Question Bank VB .net

29 428 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 29
Dung lượng 523,5 KB

Nội dung

Values stored in constants _______ during the execution of an application.

Question Bank VB .net 1. Values stored in constants _______ during the execution of an application. [0.5] a) may change b) remain unchanged 2. Constant names may or may not be a valid symbolic name. [0.5] a) True b) False 3. Char datatype contains Unicode values. [0.5] a) True b) False 4. Char datatype consumes _____ of space. [0.5] a) 2 bits c) 2 bytes b) 4 bits d) 4 bytes 5. Decimal data type in VB.net is ______ bits. [0.5] a) 8 d) 64 b) 16 e) 128 c) 32 6. In VB .net, an integer is of _____bits [0.5] a) 8 d) 64 b) 16 e) 128 c) 32 7. ______data type in VB .net can hold any type of data [0.5] a) Numeric d) Variant b) String e) Object c) Char 8. In VB .net, a long is _________bits [0.5] a) 8 d) 64 b) 16 e) 128 c) 32 9. Constants may be part of the object model for controls or user-defined constants. a) True b) False 10. If you have no code to run when the condition is False in an If .Then .Else statement then you omit the Else statement. [0.5] a) True b) False 11. In a While Loop the statements are repeated as long as the condition is: [0.5] a) True b) False 12. In a Do .Loop statement using Until keyword looping continues until the condition returns: [0.5] a) True c) False 13. When an array declared is of type Object, it can have data of any data type. [0.5] a) True b) False 14. No two arrays declared are of the same data type unless they have the same rank and element data type. [0.5] a) True b) False 15. There is/are ________ possible source/sources for constants. [0.5] a) One c) Three b) Two d) Four 16. A drop-down list is provided by VB .net [1.0] a) at the top of the code window with all the objects and events. c) at the top of the code window with only the events. b) at the bottom of the code window with all the objects and events. d) at the top of the code window with only the objects. 17. Dim s as Integer Dim t As Integer="10" s = t +10 What will the above code do? [0.5] a) declare 't' as an integer but will not assign it with any value. 's' will be assigned the final value as 10. c) declare 't' as an integer and will assign it the string 10. 's' will be assigned the final value as 10 + 10. b) declare 't' as an integer and will assign it the value 10. 's' will be assigned the final value as 20. d) result in an error, as 't' has not been assigned to an integer but a string. 18. In a decimal data type ______ bits are used for storing the integer part of the decimal number and _____ bits are used for storing the decimal part. [0.5] a) 32,16 c) 96,32 b) 32,64 d) 128,64 19. The Char datatype contains values ranging from _________. [1.0] a) 1 - 63335 c) 1 – 65533 b) 0 - 63335 d) 0 – 65535 20. The char datatype is intended for [1.0] a) use in manipulating single character values. c) creating arrays of character values. b) use in manipulating multiple character values. d) None of the above 21. Any attempt to change the value of the String: [1.0] a) results in the updating of the original string. c) results in a new String being created to store the changed value, while the original string is destroyed. b) results in a new String being created to store the changed value, while the original string is placed separately d) None of the above 22. Conditional statements allow conditional execution of statements based on expressions evaluated at run time. [1.0] a) True b) False 23. In an If .Then .Else statement, the comparision can be any expression that evaluates to: [1.0] a) Only true c) Either True or False b) Only false 24. Identify the correct statements with respect to if… then .else [1.0] a) Each expression must be implicitly convertible to Boolean. c) Each expression must be explicitly convertible to Boolean. b) Once a block finishes executing, execution passes to the end of the If .Then .Else statement. d) Once a block finishes executing, execution passes to the start of the If .Then .Else statement. 25. To execute more than one line of code when a condition is True, you use which all of the following multi-line syntax [1.0] a) If .Then and End If d) If .Then b) If .Then .Else and End If e) While .Do c) Select .CASE 26. When comparision of the same expression to different values is done, we use the: [1.0] a) If .Then statement c) Select .CASE statements b) If .Then .Else statements d) While statement 27. The size of an array which is created __________ [1.0] a) Cannot be changed after it is created c) can be changed after it has been created using the Create statement. b) Can be changed after it has been created using the Redim statement 28. When OptionStrict statement is on, a variable of one type can be automatically converted to another type. [1.0] a) True b) False 29. To exit from a While loop when the loop is endless we use the ________ statement. [1.0] a) Exit d) Exit While b) Break e) End While c) Quit 30. To exit from a Do loop we use the _______ statement [1.0] a) Exit d) End Do b) Break e) Exit Do c) Quit 31. To exit from a For Each .Next loop before it has traversed the collection we use the ________ statement. [1.0] a) Exit d) End For Each b) Break d) End For c) Exit For 32. Consider three variables s1, s2, and s3. These variables are declared as: " Dim s1, s2, s3 As Integer " The above declaration indicates: [1.0] a) s1, s2, as Objects and s3 as an Integer. c) s1, s2, s3 as Integers. b) s1 as Integer and s2, s3 as Object data types. d) the above statement will result in an error. 33. Identify the correct statements with respect to VB .net. [1.5] a) It supports late-binding d) All arrays are zero-based. b) It is case-sensitive e) It supports operator overloading. c) It can flag syntactical errors immediately 34. Dim Trial As Integer = 0 Dim no1 As Integer = 90 While no1> 20 no1 = no1 - 3 Trial = Trial + 1 End While Identify the number of times the while loop is executed. [1.5] a) 24 c) 70 b) 38 d) The loop will not execute 35. Dim Counter As Integer = 0 [1.5] Dim number As Integer = 20 Do number = number - 1 Counter = Counter + 1 TextBox1.Text = TextBox1.Text & number TextBox2.Text = TextBox2.Text & Counter Loop While number > 20 Identify the number of times the loop is executed. a) 0 c) 2 b) 1 36. Identify the correct statements with respect to arrays. [1.5] a) The dimensionality or rank of the array corresponds to the number of subscripts used to indentify individual elements. c) You can change the size of an array after you have created it. b) Arrays have a fixed size in Visual Basic. d) Every array type is an individual reference type. 37. The length dimension of an array is limited to the maximum value of ________. [1.5] a) (2 ^ 32) d) (2 ^ 32) – 1 b) (2 ^ 64) e) (2 ^ 64) - 1 c) (2 ^ 128) f) (2 ^ 128) - 1 38. Identify the correct statements. [1.5] a) In a multidimensional array, you can only change the last dimension when you use the ReDim statement. d) In a multidimensional array, you can only change the first dimension when you use the keyword Preserve. b) In a multidimensional array, e) In a multidimensional array, you can only change the last dimension when you use the keyword Preserve. you can only change the first dimension when you use the ReDim statement. c) While using Redim to preserve the existing values of an array we use the keyword Preserve. 39. The ability of a language to create a "black box" code is termed as _________. [1.5] a) Encapsulation c) Polymorphism b) Abstraction d) Inheritance 40. The ability of a routine to behave differently with different classes is termed as ________. [1.5] a) Encapsulation c) Polymorphism b) Abstraction d) Inheritance 41. A class can gain the properties and behaviour of an existing class and this is done by a process known as __________. [1.5] a) Encapsulation c) Polymorphism b) Abstraction d) subclassing 42. _______ strings are compared using binary comparision algorithm. [1.5] a) OptionExplicit c) OptionCompare b) OptionStrict 43. The _________ statement requires declaration of all variable [1.5] a) OptionExplicit c) OptionCompare b) OptionStrict 44. Identify the correct statements with respect to constants. [1.5] a) It is a meaningful name that takes the place of a number or string that may or may not change. d) More than one constant can be declared on a single line if you separate them with commas. b) It is a meaningful name that takes the place of a number or string that does not change. e) Constants can be defined in terms of previously defined constants. c) Like a variable it is possible to assign a new value to a constant. 45. Assume three variables d1, d2, d3. These variables are declared as shown in the statement below. "Dim d1, d2, d3 As Integer = 20". Identify the correct statement. [2.0] a) Value of d1, d2 & d3 = 20. c) Value of d1 and d2 =20 and value of d3=0. b) Value of d1 and d2 =0, value of d3 =20. d) Explicit initialization is not permitted with multiple declarators. 46. "Public Const d1 = 20" can be placed in: [Identify the correct options] [2.0] a) Form Load Event c) Public sub new b) Public class form event d) None of the above 47. The 'start' button is clicked to debug the code and execute it, if errors are encountered then these errors are displayed in the description box. Identify the correct statement. [2.0] [...]... base class while using the MustOverride keyword then the method is called a/an: a) abstract method c) destructor method b) constructor method d) pure virtual method 107 For using Multiple Inheritance in VB. net we implement: a) Classes c) Procedures b) Functions [1.0] d) interfaces 108 When the Get procedure returns a value it is usually a _ class [1.5] level variable that stores the property value after... using the same argument proves advantageous as it protects a variable from being changed by the called procedure b) Passing a ByVal argument d) When a ByVal argument is proves advantageous as the passed VB creates a copy procedure can return a value of the entire data content to the calling code using the same argument 78 Module Module1 Sub main() Dim c1 As Integer c1 = 12 trialrun(c1) System.Console.WriteLine(c1)... from b) Prevents classes from being inherited from other classes By default a parent class is always set to allow the subclass to override [0.5] it a) True b) False 96 It is a must to use constructors in VB net a) True 97 True [0.5] b) False In interfaces methods cannot be overloaded a) True 99 False A subclass must define its own constructors a) 98 b) [0.5] b) [0.5] False Properties in a class module... 51 Dim Counter As Integer = 2 While Counter < 24 Counter += 2 TextBox1.Text = Counter End While Identify the output of the above code [2.0] a) c) 22 b) 52 12 18 d) 24 A procedure is declared as Sub in VB net a) True b) False [0.5] 53 When you want to use the value returned by a function, you can use a function procedure on the side of an expression a) right 54 55 b) False b) False When a variable . Question Bank VB .net 1. Values stored in constants _______. 4 bits d) 4 bytes 5. Decimal data type in VB. net is ______ bits. [0.5] a) 8 d) 64 b) 16 e) 128 c) 32 6. In VB .net, an integer is of _____bits [0.5] a)

Ngày đăng: 09/04/2013, 09:10

TỪ KHÓA LIÊN QUAN

w