Quiznetik

.NET Programming | Set 1

1. A variable which is declared inside a method is called a________variable

Correct : B. Local

2. Which is the String method used to compare two strings with each other ?

Correct : B. Compare()

3. Minimum and Maximum range of values supported by ‘float’ data type are ?

Correct : C. 1.5 * 10 ^-45 to 3.4 * 10 ^38

4. Which datatype should be more preferred for storing a simple number like 35 to improve execution speed of a program?

Correct : A. sbyte

5. What will be output of the following conversion ? static void Main(string[] args) { char a = 'A'; string b = "a"; Console.WriteLine(Convert.ToInt32(a)); Console.WriteLine(Convert.ToInt32(Convert.Tochar(b))); Console.ReadLine(); }

Correct : C. 65, 97

6. Scope of variable is related to definition of variable as: 1. Region of code within which variable value is valid and hence can be accessed. 2. No, relation with region where variable is declared its value is valid in entire scope.

Correct : A. a

7. Type of Conversion in which compiler is unable to convert the datatype implicitly is ?

Correct : B. int to uint

8. Select output of the given set of Code : static void Main(string[] args) { String name = "Dr.Gupta"; Console.WriteLine("Good Morning" + name); }

Correct : C. Good Morning Dr.Gupta

9. Which of the following is an 8-byte Integer?

Correct : B. Long

10. Which of the following is NOT an Integer?

Correct : A. Char

11. Which of the following are value types? 1.Integer 2.Array 3.Single 4.String 5.Long

Correct : B. 1, 3, 5

12. Which of the following does not store a sign?

Correct : D. Byte

13. What is the size of a Decimal?

Correct : C. 16 byte

14. Which of the following is the correct size of a Decimal datatype?

Correct : D. 16 Bytes

15. Which of the following statements is correct?

Correct : C. Interfaces members are automatically public.

16. Which of the following can implement an interface? 1.Data 2.Class 3.Enum 4.Structure 5.Namespace

Correct : B. 2, 4

17. Which of the following will be the correct output for the C#.NET code snippet given below? String s1 = "ALL MEN ARE CREATED EQUAL"; String s2; s2 = s1.Substring(12, 3); Console.WriteLine(s2);

Correct : B. CRE

18. If s1 and s2 are references to two strings, then which of the following is the correct way to compare the two references?

Correct : C. s1.Equals(s2)

19. Which of the following is the correct output of the C#.NET code snippet given below? int[ , , ] a = new int[ 3, 2, 3 ]; Console.WriteLine(a.Length);

Correct : C. 18

20. Which of the following are NOT Relational operators in C#.NET? 1.>= 2.!= 3.Not 4.<= 5.<>=

Correct : C. 3, 5

21. Which of the following is NOT an Assignment operator in C#.NET?

Correct : A. \=

22. A GUI:

Correct : D. Both a and b.

23. Visual Studio .NET provides which feature:

Correct : D. All of the above..

24. What does IDE stand for?

Correct : A. Integrated Development Environment

25. Which is not a main component of the Visual Studio IDE?

Correct : C. Start Menu

26. Which does the solution explorer not display?

Correct : A. Form Properties

27. The Button control can be activated:

Correct : D. Both a and b.

28. Which sequence of char data types is listed from lowest to highest?

Correct : D. A, Z, a, z

29. The Boolean data type:

Correct : D. Both a and b.

30. VB.Net identifiers:

Correct : B. can begin with an underscore.

31. The proper operator precedence, from first to last, is:

Correct : B. arithmetic, comparison, and logical.

32. With A = False and B = True, which statement evaluates as True?

Correct : D. B AND B

33. Which operator is evaluated first?

Correct : A. NOT

34. In the For…Next statement the default value for the Step is:

Correct : C. 1

35. Which is a type of procedure found in VB.Net?

Correct : D. All of the above.

36. A sub procedure is valuable because it:

Correct : D. Both a and b.

37. Which method will return the number of elements in an array?

Correct : B. Length

38. What is required to reference an element in an array?

Correct : D. Both a and b.

39. Which method will arrange the elements of an array in alphabetical order?

Correct : D. Sort

40. Which dialog control allows the user to zoom in on a document?

Correct : B. PrintPreview

41. Which is not an ADO.NET DataAdapter Object?

Correct : C. QueryDataAdapter

42. Where does a web application reside?

Correct : B. Web server

43. Which is an example of a web document?

Correct : D. Both a and b.

44. A postback occurs when:

Correct : D. Both a and b.

45. Which set of symbols are used to signify the presence of ASP.NET code?

Correct : D. <%

46. Which is the file extension used for an ASP.NET file?

Correct : D. aspx

47. What is the extension for a Visual Basic web form interface file?

Correct : B. .aspx

48. When an ASP.NET file is placed on an IIS server and viewed through a browser, the resulting HTML page contains:

Correct : D. all HTML code.

49. What is the extension for a Visual Basic web form code file?

Correct : D. .aspx.vb

50. Which HTML tag creates a link to another browser page?

Correct : A. A href