Quiznetik

C# Programming | Set 2

1. The reason that C# does not support multiple inheritances is because of ______.

Correct : B. Name collision

2. _______ is a set of devices through which a user communicates with a system using interactive set of commands.

Correct : A. Console

3. Exponential formatting character (‘E’ or ‘e’) converts a given value to string in the form of _______.

Correct : A. m.dddd

4. The ______ are the Graphical User Interface (GUI) components created for web based interactions..

Correct : B. Window Forms

5. In Microsoft Visual Studio, ______ technology and a programming language such as C# is used to create a Web based application.

Correct : D. ASP.NET

6. The controls available in the tool box of the ______ are used to create the user interface of a web based application.

Correct : A. Microsoft visual studio IDE

7. Web Forms consists of a _______ and a _________ .

Correct : A. Template, Component

8. The ______ parentheses that follow _____ indicate that no information is passed to Main().

Correct : C. Empty, Main

9. The scope of a variable depends on the ____________ and _________.

Correct : B. Type of the variable, console

10. Which of the following statements is correct about the C#.NET code snippet given below? class Student s1, s2; // Here 'Student' is a user-defined class. s1 = new Student(); s2 = new Student();

Correct : C. Contents of the two objects created will be exactly same.

11. Which of the following can be facilitated by the Inheritance mechanism? 1 Use the existing functionality of base class. 2 Overrride the existing functionality of base class. 3 Implement new functionality in the derived class. 4 Implement polymorphic behaviour. 5 Implement containership.

Correct : A. 1, 2, 3

12. Which of the following should be used to implement a 'Has a' relationship between two entities?

Correct : C. Containership

13. Which of the following should be used to implement a 'Like a' or a 'Kind of' relationship between two entities?

Correct : D. Inheritance

14. How can you prevent inheritance from a class in C#.NET ?

Correct : C. Declare the class as seal

15. A class implements two interfaces each containing three methods. The class contains no instance data. Which of the following correctly indicate the size of the object created from this class?

Correct : B. 24 bytes

16. Which of the following statements is correct about Interfaces used in C#.NET?

Correct : B. Interfaces can be inherited.

17. Which of the following statements is correct about an interface used in C#.NET?

Correct : A. If a class implements an interface partially, then it should be an abstract class.

18. Which of the following statements is correct about an interface?

Correct : C. A class that implements an interface can explicitly implement members of that interface.

19. Databases store information in records, fields and:

Correct : D. tables

20. Each data provider class is grouped and accessible through its:

Correct : A. namespace

21. In Visual Studio, the tool that enables you to connect to a database and automatically populate a dataset object using a TableAdapter object is the ___________wizard:

Correct : A. Data Source Configuration

22. In XML, a document is a hierarchy of

Correct : B. elements

23. Which of the following namespace contains the LINQ to XML?

Correct : C. System.Xml.Linq;

24. LINQ to SQL works with

Correct : C. Both (a) and (b)

25. A connection string contains

Correct : B. the name of the data source

26. To avoid writing additional SQL statements to update a live database, you instantiate an object of which class?

Correct : A. DataAdapter

27. The following namespaces (System.Data.OleDB, System.Data.SqlClient, System.Data.Odbc, System.Data.OracleClient) include classes for different:

Correct : A. Data providers

28. Which of the following is a definition of a database?

Correct : A. It is a collection of related information organized on a computer.

29. A computer application for managing databases and pulling together data to generate reports and make decisions is known as a(n)

Correct : D. Database Management System (DBMS).

30. Which of the following characterizes the relational model for databases?

Correct : B. It splits data into separate row and column areas called tables.

31. A field is a

Correct : C. common characteristic in a table of information.

32. Forms and reports, used for entering and editing records, and for generating useful information in reports are

Correct : D. stored separately from databases.

33. A computer application that manages a database, in which different kinds of data are stored in separate tables, is known as a

Correct : D. Relational database management system.

34. Which of the following are examples of relational database management systems?

Correct : D. Microsoft Access and SQL 2000

35. A unique field which distinguishs a record is known as a

Correct : D. Secondary key.

36. In a database, a parent-child relationship is also known as a

Correct : C. One-to-many relationship.

37. The field in the child table that links information to the parent table is known as the

Correct : A. Foreign key.

38. ADO.NET is the data access component of Microsoft’s .NET framework that enables you to

Correct : B. connect your Visual Basic.NET applications to databases.

39. ADO.NET was created for

Correct : A. Multiple users.

40. Which of the following statements characterizes the relationship between a Visual Basic.NET program and a database record?

Correct : C. They are connected as long as the program is running.

41. A copy of a database is called a

Correct : B. Dataset.

42. When is the dataset connected to the database?

Correct : A. Whenever the program makes changes to a field or record

43. The connection to the database is established by

Correct : C. Using managed providers.

44. The ADO.NET disconnected dataset

Correct : A. Provides a flexible way of working with database records.

45. XML provides a(n)

Correct : C. Consistent format for data across applications, networks, and the Internet.

46. Why does Visual Studio.NET use XML as a data storage technology?

Correct : C. XML is optimized for sharing data across the Internet.

47. Choose the correct statements about the LINQ?

Correct : A. The main concept behind the linq is query

48. Choose the namespace in which the interface IEnumerable is declared?

Correct : A. System.Collections

49. Can we use linq to query against a DataTable?

Correct : A. Yes

50. Select the namespace which should be included while making use of LINQ operations:

Correct : C. System.Linq

51. What is meant by the term generics?

Correct : A. parameterized types

52. Are generics in C# are same as the generics in java and templates in C++?

Correct : A. Yes

53. Choose the advantages of using generics?

Correct : D. All of the mentioned

54. Which among the given classes present in System.Collection.Generic.namespace?

Correct : A. Stack

55. Which feature enables to obtain information about use and capabilities of types at runtime?

Correct : B. Reflection

56. Choose the namespace which consists of classes that are part of .NET Reflection API:

Correct : C. System.Reflection