.Net Preliminary Test! Check Your Proficiency! Trivia Quiz

30 Questions | Attempts: 509
Share

SettingsSettingsSettings
DotNET Quizzes & Trivia

Below is a. Net preliminary test perfectly designed to check your proficiency! NET is a framework that provides a programming guidelines that can be used to develop a wide range of applications while making use of different computer languages. By taking the quiz you will get to see if you might need a refresher so as to understand everything about this framework. All the best as you tackle.


Questions and Answers
  • 1. 
    In order to use the for-each statement, what interface needs to be implemented by the target class?
    • A. 

      IEnumerable

    • B. 

      IEnumerator

    • C. 

      ICollection

    • D. 

      IList

  • 2. 
    The .NET Framework provides a run time environment called ..... ?
    • A. 

      RMT

    • B. 

      RCT

    • C. 

      CLS

    • D. 

      CLR

  • 3. 
    Find the term: The .NET framework provides automatic memory management using a technique called ______________ ?
    • A. 

      Serialization

    • B. 

      Assemblies

    • C. 

      Garbage Collection

    • D. 

      Overriding

  • 4. 
     In .NET the operation of reading metadata and using its contents is known as ______?
    • A. 

      Reflection

    • B. 

      Enumeration

    • C. 

      Serialization

    • D. 

      Binding

  • 5. 
    How many classes can a single .NET DLL contain?
    • A. 

      One

    • B. 

      Two

    • C. 

      Many

    • D. 

      None

  • 6. 
    What is the top .NET class that everything is derived from?
    • A. 

      Object

    • B. 

      System.Net

    • C. 

      System

    • D. 

      System.Object

  • 7. 
    A variable declared inside a method is called a________variable.
    • A. 

      Static

    • B. 

      Private

    • C. 

      Instance

    • D. 

      Local

    • E. 

      Both Private and Instance

  • 8. 
    Which of these statements correctly declares a two-dimensional integer array in C#?
    • A. 

      Int[,] myArray;

    • B. 

      Int[][] myArray;

    • C. 

      Int[2] myArray

    • D. 

      Int myArray[2];

  • 9. 
    Class String and the Char structure found in the:
    • A. 

      System.Strings namespace

    • B. 

      System.Chars namespace

    • C. 

      System.Text namespace

    • D. 

      System namespace

  • 10. 
    The proper way to convert a string to all lowercase is:
    • A. 

      String = string.ToLower(string);

    • B. 

      String.ToLower(string);

    • C. 

      ToLower(string);

    • D. 

      String.ToLower();

  • 11. 
    If two StringBuilder objects contain the same string then
    • A. 

      They represent the same memory location

    • B. 

      If one changes, so will the other

    • C. 

      They are two different objects

    • D. 

      None of the above

  • 12. 
    Find any errors in the following BankAccount constructor:     public int BankAccount() {        balance = 0;     }
    • A. 

      Formal parameters

    • B. 

      ReturnType

    • C. 

      Name

    • D. 

      No Errors

  • 13. 
    In the body of a method, C# uses the keyword named_____ to refer the current instance of a class.
    • A. 

      Do

    • B. 

      Static

    • C. 

      This

    • D. 

      Sealed

  • 14. 
    Polymorphism occurs when the methods of the child class
    • A. 

      Override the parent class methods but maintain the same implementation

    • B. 

      Maintain the same return type and arguments as the parent class, but implement it differently

    • C. 

      Have different return types and arguments than the parent class

    • D. 

      Are Virtual

  • 15. 
    ASP.NET separates the HTML output from program logic using a feature named as?
    • A. 

      Inline Page Technique

    • B. 

      Code Behind

    • C. 

      Exception

    • D. 

      Code Separation

  • 16. 
    What is the base class from which all Web forms inherit?
    • A. 

      Master

    • B. 

      Page

    • C. 

      Form

    • D. 

      WebPage

  • 17. 
    If one has two different web form controls in a application and wanted to know whether the values in the above two different web form control match.  What control must be used?
    • A. 

      CompareValidator

    • B. 

      GridView

    • C. 

      TextBox

    • D. 

      ListView

  • 18. 
    Which of the following allow writing formatted output?
    • A. 

      Response.Write()

    • B. 

      Response.Output.Write()

    • C. 

      Both

    • D. 

      None

  • 19. 
    Which of the following denote the property in every validation control?
    • A. 

      Text

    • B. 

      ControlToValidate

    • C. 

      ErrorMessage

    • D. 

      All of the above

  • 20. 
    You are a database developer for Woodgrove Bank. You are implementing a process that loads data into a SQL Server database. As a part of this process, data is temporarily loaded into a table named "Staging". When the data load process is complete, the data should be deleted from this table. You will never need to recover this deleted data. You need to ensure that the data from the Staging table is deleted as quickly as possible. What should you do?
    • A. 

      Use a DELETE statement to remove the data from the table.

    • B. 

      Use a TRUNCATE TABLE statement to remove the data from the table.

    • C. 

      Use a DROP TABLE statement to remove the data from the table.

    • D. 

      Use an updateable cursor to access and remove each row of data from the table.

  • 21. 
    You are a database developer for a sales organization. Your database has a table named Sales that contains summary information regarding the sales orders from salespeople. The sales manager asks you to create a report of the salespeople who had the 20 highest total sales.Which query should you use to accomplish this?
    • A. 

      SELECT TOP 20 PERCENT LastName, FirstName, SUM (OrderAmount) AS ytd FROM sales GROUP BY LastName, FirstName ORDER BY 3 DESC

    • B. 

      SELECT TOP 20 PERCENT LastName, FirstName, MAX (OrderAmount) AS ytd FROM sales GROUP BY LastName, FirstName ORDER BY 3 DESC

    • C. 

      SELECT TOP 20 LastName, FirstName, SUM (OrderAmount) AS ytd FROM sales GROUP BY LastName, FirstName ORDER BY 3 DESC

    • D. 

      SELECT TOP 20 LastName, FirstName, MAX (OrderAmount) AS ytd FROM sales GROUP BY LastName, FirstName ORDER BY 3 DESC

  • 22. 
    You want to execute a DELETE SQL query on a table in the database. You want to retrieve the number of rows that were deleted. What code should you use?
    • A. 

      SqlCommand cmd = new SqlCommand(); cmd.CommandText = "DELETE FROM MyTable"; cmd.Connection=ConObj; int rowcount = cmd.ExecuteScalar();

    • B. 

      SqlCommand cmd = new SqlCommand(); cmd.CommandText = "DELETE FROM MyTable"; cmd.Connection=ConObj; int rowcount = cmd.ExecuteNonQuery();

    • C. 

      SqlCommand cmd = new SqlCommand(); cmd.CommandText = "DELETE FROM MyTable"; cmd.Connection=ConObj; SqlDataReader dr = cmd.ExecuteReader();

    • D. 

      SqlCommand cmd = new SqlCommand(); cmd.CommandText = "DELETE FROM MyTable"; cmd.Connection=ConObj; int rowcount; cmd.ExecuteNonQuery(out rowcount);

  • 23. 
    You use a DataTable to load data from the Orders Table from a database. The Orders table contains two columns: Quantity, and UnitPrice. You want to add another column, which computes the total price using the formula : TotalPrice=Quantity*UnitPrice. What code will you use to add this third column to the DataTable?
    • A. 

      DataTable.Columns.Add(new DataColumn("TotalPrice", typeof(Double), "Quantity" * "UnitPrice"));

    • B. 

      DataTable.Columns.Add(new DataColumn("TotalPrice", typeof(Double), Quantity * UnitPrice));

    • C. 

      DataTable.Columns.Add(new DataColumn("TotalPrice", typeof(Double), "Quantity * UnitPrice"));

    • D. 

      DataTable.Columns.Add(new DataColumn("TotalPrice", typeof(Double), "Quantity", "UnitPrice"));

  • 24. 
    What tags one need to add within the asp:GridView tags to bind columns manually?
    • A. 

      Set AutoGenerateColumns Property to false on the gridview tag

    • B. 

      Set AutoGenerateColumns Property to true on the gridview tag

    • C. 

      Set AutoManualColumns Property to true on the gridview tag

    • D. 

      It is not possible to do that operation

  • 25. 
    Which method do you invoke on the DataAdapter control to load your generated dataset with data?
    • A. 

      LoadData()

    • B. 

      GetData()

    • C. 

      FillData()

    • D. 

      Fill()

Related Topics

Back to Top Back to top
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.