Asp.Net And SQL Basic 2

Approved & Edited by ProProfs Editorial Team
The editorial team at ProProfs Quizzes consists of a select group of subject experts, trivia writers, and quiz masters who have authored over 10,000 quizzes taken by more than 100 million users. This team includes our in-house seasoned quiz moderators and subject matter experts. Our editorial experts, spread across the world, are rigorously trained using our comprehensive guidelines to ensure that you receive the highest quality quizzes.
Learn about Our Editorial Process
| By Anishjraveendran
A
Anishjraveendran
Community Contributor
Quizzes Created: 1 | Total Attempts: 116
Questions: 25 | Attempts: 116

SettingsSettingsSettings
Asp.Net And SQL Basic 2 - Quiz


Those of you studying computer science might be scratching your heads when coming to grips with open source web frameworks like ASP. NET and database programming languages like SQL, but this basic quiz will help show you the ropes regarding the two topics. How much do you know so far?


Questions and Answers
  • 1. 

    ASP.NET is a _________________________ ?

    • A.

      Server Side Scripting Technology

    • B.

      Client Side Scripting Technology

    • C.

      Programming Language

    • D.

      Database Programming Language same as SQL.

    Correct Answer
    A. Server Side Scripting Technology
    Explanation
    ASP.NET is a server-side scripting technology that allows developers to create dynamic web applications. It is used to generate HTML, XML, and other types of web pages that are sent to the client's web browser. This technology runs on the web server and processes the requests from the client, allowing for the execution of server-side code and interaction with databases. Unlike client-side scripting technologies, which run on the client's browser, ASP.NET executes on the server, making it a server-side scripting technology.

    Rate this question:

  • 2. 

    What is ASP+ ?

    • A.

      ASP+ is the same as ASP.NET.

    • B.

      ASP+ is the Next version of ASP.NET

    • C.

      ASP+ is just an early name used by Microsoft when they developed ASP.NET.

    • D.

      ASP+ is a programming Language Specially developed for ASP.NET

    • E.

      (1)&(2)

    Correct Answer
    E. (1)&(2)
    Explanation
    The correct answer is (1)&(2). This is because ASP+ is both the same as ASP.NET and the next version of ASP.NET. It was an early name used by Microsoft during the development of ASP.NET, indicating that it is a programming language specifically developed for ASP.NET. Therefore, both statements (1) and (2) are correct.

    Rate this question:

  • 3. 

    ASP.NET provides increased performance by ____________________?

    • A.

      Supporting active variables

    • B.

      Running CLR

    • C.

      Running compiled code

    • D.

      Using IIS Server

    Correct Answer
    C. Running compiled code
    Explanation
    ASP.NET provides increased performance by running compiled code. When an ASP.NET application is deployed, the source code is compiled into a binary format, which allows the server to execute the code directly without the need for interpretation or just-in-time (JIT) compilation. This eliminates the overhead of compiling the code on the fly, resulting in faster execution and improved performance.

    Rate this question:

  • 4. 

    Can you allow class to be inherited, but prevent the method from being over-ridden?

    • A.

      Yes

    • B.

      No

    Correct Answer
    A. Yes
    Explanation
    Yes, it is possible to allow a class to be inherited but prevent the method from being overridden by using the "final" keyword in the method declaration. When a method is marked as "final", it cannot be overridden by any subclass. This allows the class to be inherited and used as a base class, but ensures that the specific method remains unchanged and cannot be modified in any subclass.

    Rate this question:

  • 5. 

    When do you absolutely have to declare a class as abstract?

    • A.

      When at least one of the methods in the class is abstract

    • B.

      When all of the other methods in the class is abstract.

    Correct Answer
    A. When at least one of the methods in the class is abstract
    Explanation
    A class must be declared as abstract when at least one of its methods is abstract. This is because an abstract method is a method that is declared without an implementation, and it must be overridden by any concrete subclass. Therefore, if a class has an abstract method, it cannot be instantiated directly and must be declared as abstract. However, if all the other methods in the class are abstract, it is not necessary to declare the class as abstract because the presence of abstract methods already implies that the class is abstract.

    Rate this question:

  • 6. 

    When will the garbage collector run?

    • A.

      Every 15 minutes

    • B.

      Once every day at a specific activated time

    • C.

      When the application is low on memory

    • D.

      Randomly based on the resource load on the system

    Correct Answer
    D. Randomly based on the resource load on the system
    Explanation
    The garbage collector in an application is responsible for reclaiming memory that is no longer in use. It runs randomly based on the resource load on the system. When the system is under high resource load, the garbage collector may run more frequently to free up memory. Conversely, when the system is not under heavy load, the garbage collector may run less frequently. This random scheduling allows the garbage collector to adapt to the current state of the system and optimize memory management accordingly.

    Rate this question:

  • 7. 

    Which tool would you use, if you want to see all the methods of a particular class in your application?

    • A.

      ObjectBrowser

    • B.

      ObjectExplorer

    • C.

      ClassBrowser

    • D.

      ClassExplorer

    Correct Answer
    A. ObjectBrowser
    Explanation
    The ObjectBrowser tool would be used to see all the methods of a particular class in the application. This tool allows users to navigate through the objects and classes in the application and view their properties and methods. It provides a comprehensive view of the structure and functionality of the classes in the application, making it easier for developers to understand and work with the code.

    Rate this question:

  • 8. 

    What tool is used to manage the assemblies in the Global Assembly Cache?

    • A.

      Gacmgr.exe

    • B.

      Gacutil.exe

    • C.

      Gassy.exe

    • D.

      Gaccahe.exe

    Correct Answer
    B. Gacutil.exe
    Explanation
    Gacutil.exe is the correct answer for managing assemblies in the Global Assembly Cache (GAC). The Global Assembly Cache is a central location where shared .NET assemblies are stored on a computer. Gacutil.exe is a command-line tool provided by Microsoft that allows developers to install, uninstall, and view information about assemblies in the GAC. It provides functionality to add assemblies to the GAC, remove them, and display a list of assemblies currently installed.

    Rate this question:

  • 9. 

    System.dll is ?

    • A.

      Private assembly

    • B.

      Shared Assembly

    • C.

      Its Not an assembly

    • D.

      None

    Correct Answer
    B. Shared Assembly
    Explanation
    System.dll is a shared assembly. Shared assemblies are libraries or components that can be used by multiple applications on the same machine. They are stored in the Global Assembly Cache (GAC) and can be accessed by different applications, providing code reusability and reducing redundancy. System.dll, being a part of the system framework, is a shared assembly that contains common functionality and can be utilized by various applications.

    Rate this question:

  • 10. 

    What is CLS?

    • A.

      Compiler Language System

    • B.

      Common Language System

    • C.

      Common Language Specification

    • D.

      None

    Correct Answer
    C. Common Language Specification
    Explanation
    The Common Language Specification (CLS) is a set of rules and guidelines that ensures language interoperability in the .NET Framework. It defines a minimum set of features and data types that all languages targeting the .NET Framework should support. By adhering to the CLS, developers can write code in one language and use it seamlessly with code written in another language within the .NET ecosystem. Therefore, the correct answer is Common Language Specification.

    Rate this question:

  • 11. 

    What is the Use of Debug and Trace commands?

    • A.

      To help to monitor

    • B.

      To detect Malfunctions

    • C.

      To Provide Performance Measurement Information

    • D.

      All of the Above

    Correct Answer
    D. All of the Above
    Explanation
    The use of Debug and Trace commands includes monitoring, detecting malfunctions, and providing performance measurement information. Debug commands help in monitoring the execution of a program, allowing developers to track the flow of code and identify any errors or issues. Trace commands are used to detect malfunctions by providing detailed information about the program's execution, allowing developers to identify and fix any bugs or problems. Additionally, both commands can be used to gather performance measurement information, helping developers analyze and optimize the performance of their code. Therefore, the correct answer is "All of the Above."

    Rate this question:

  • 12. 

    How could you avoid to receive focus on a particular control while user presses tab key?

    • A.

      Set TabStop Property to false

    • B.

      Set TabIndex Property to 1

    • C.

      Set AcceptTab Property to false

    • D.

      Using Dock Property

    Correct Answer
    A. Set TabStop Property to false
    Explanation
    Setting the TabStop property to false for a particular control will prevent it from receiving focus when the user presses the tab key. This means that when the user navigates through the controls using the tab key, this specific control will be skipped, and focus will move to the next control in the tab order.

    Rate this question:

  • 13. 

    A project on which you are working calls for you to store small amount of frequently changing information about a page on the client.For this project, security is not a worry. Which is the best method to use?

    • A.

      A cookie

    • B.

      A query string

    • C.

      A url

    • D.

      A javascript function

    • E.

      A hidden form field

    Correct Answer
    E. A hidden form field
    Explanation
    A hidden form field is the best method to use in this scenario because it allows you to store small amounts of frequently changing information about a page on the client. It is hidden from the user's view and can be easily accessed and manipulated using JavaScript. Unlike cookies, query strings, and URLs, hidden form fields do not have any security concerns.

    Rate this question:

  • 14. 

    Do I need IIS to develop a Web application in ASP.NET 2.0?

    • A.

      Yes

    • B.

      No

    Correct Answer
    B. No
    Explanation
    No, you do not need IIS to develop a web application in ASP.NET 2.0. ASP.NET 2.0 includes a built-in web server called Cassini, which can be used for development purposes. Cassini allows developers to run and test their web applications without the need for a full-fledged web server like IIS. However, when deploying the application for production, IIS is typically used as the web server.

    Rate this question:

  • 15. 

    What the 1st method that is fired during the page load?

    • A.

      PreRender()

    • B.

      Init()

    • C.

      Load()

    • D.

      Unload()

    Correct Answer
    B. Init()
    Explanation
    During the page load, the first method that is fired is the Init() method. This method is used to initialize the page and its controls. It is called before the page is loaded and before any control events are handled. It is typically used to set initial values, create dynamic controls, or perform any necessary setup tasks. Once the Init() method is executed, the page proceeds to the next stage of the page lifecycle, which is the Load() method.

    Rate this question:

  • 16. 

    What data types do the RangeValidator control support?

    • A.

      Integer, String, and Date

    • B.

      Integer, String, and float

    • C.

      Integer, ushort, and Date

    • D.

      Decimal, String, and Date

    • E.

      Integer, String, and bool

    Correct Answer
    A. Integer, String, and Date
    Explanation
    The RangeValidator control supports three data types: Integer, String, and Date. This means that the control can validate input values that are integers, strings, or dates, ensuring that they fall within a specified range.

    Rate this question:

  • 17. 

    How does ASP.NET store SessionIDs by default?

    • A.

      In cache

    • B.

      In cookies

    • C.

      In a global variable

    • D.

      In URL strings or in a database

    Correct Answer
    B. In cookies
    Explanation
    ASP.NET stores SessionIDs by default in cookies. Cookies are small pieces of data that are stored on the client's browser. When a user visits a website, the server sends a cookie to the client's browser, which then stores it. The cookie contains the SessionID, which is used to identify the user's session on the server. This allows the server to retrieve the session data for the user when needed. Storing SessionIDs in cookies is a common and convenient method as it does not require any additional configuration or setup.

    Rate this question:

  • 18. 

    Security is very important on any web site. By default, a .Net web site is configured with which of the following authentication types?

    • A.

      Anonymous

    • B.

      Basic

    • C.

      Digest

    • D.

      Integrated Windows authentication

    • E.

      Answer 1 & 4

    Correct Answer
    E. Answer 1 & 4
    Explanation
    A .Net web site is configured with anonymous authentication by default, which allows users to access the site without providing any credentials. Integrated Windows authentication is also configured by default, which allows users to authenticate using their Windows credentials. This combination ensures that the site can be accessed by both anonymous users and authenticated users using their Windows credentials.

    Rate this question:

  • 19. 

    ________ removes all rows from a table without logging the individual row deletions.

    • A.

      Drop

    • B.

      Delete

    • C.

      Truncate

    • D.

      Update

    • E.

      Alter

    Correct Answer
    C. Truncate
    Explanation
    Truncate is the correct answer because it removes all rows from a table without logging the individual row deletions. Unlike the delete statement, truncate does not generate individual delete statements for each row, making it faster and more efficient for deleting all rows in a table. Additionally, truncate cannot be rolled back, so it is important to use it with caution as it permanently removes all data from the table.

    Rate this question:

  • 20. 

    When using the SQL INSERT statement:

    • A.

      Rows can be modified according to criteria only.

    • B.

      Rows cannot be copied in mass from one table to another only.

    • C.

      Rows can be inserted into a table only one at a time only.

    • D.

      Rows can either be inserted into a table one at a time or in groups

    Correct Answer
    D. Rows can either be inserted into a table one at a time or in groups
    Explanation
    The answer is "rows can either be inserted into a table one at a time or in groups" because the SQL INSERT statement allows for the insertion of multiple rows at once by specifying multiple sets of values to be inserted. This can be done by using a comma-separated list of values or by using a SELECT statement to retrieve data from another table and insert it into the target table. Therefore, it is possible to insert rows individually or in groups using the SQL INSERT statement.

    Rate this question:

  • 21. 

    The primary key is selected from the

    • A.

      Composite keys

    • B.

      Determinants

    • C.

      Candidate keys

    • D.

      Foreign keys

    Correct Answer
    C. Candidate keys
    Explanation
    The primary key is selected from the candidate keys. Candidate keys are the potential keys that can uniquely identify each record in a table. From these potential keys, one is chosen as the primary key. The primary key is a unique identifier for each record and is used to enforce data integrity and ensure the uniqueness of each record in the table.

    Rate this question:

  • 22. 

    The command to remove rows from a table 'CUSTOMER' is:

    • A.

      REMOVE FROM CUSTOMER ...

    • B.

      DROP FROM CUSTOMER ...

    • C.

      DELETE FROM CUSTOMER WHERE ...

    • D.

      UPDATE FROM CUSTOMER ...

    Correct Answer
    C. DELETE FROM CUSTOMER WHERE ...
    Explanation
    The correct answer is "DELETE FROM CUSTOMER WHERE ...". This command is used to remove rows from a table called 'CUSTOMER' based on a specified condition. The WHERE clause is used to specify the condition that must be met for the rows to be deleted. This command is commonly used in SQL to delete specific rows from a table.

    Rate this question:

  • 23. 

    The SQL WHERE clause:

    • A.

      Limits the column data that are returned.

    • B.

      Limits the row data are returned.

    • C.

      Both A and B are correct.

    • D.

      Neither A nor B are correct.

    Correct Answer
    B. Limits the row data are returned.
    Explanation
    The SQL WHERE clause is used to filter rows based on a specified condition. It allows us to retrieve only the rows that meet the specified criteria, thus limiting the row data that are returned. The WHERE clause does not have any effect on the columns that are returned, so the statement "limits the column data that are returned" is incorrect. Therefore, the correct answer is "limits the row data are returned."

    Rate this question:

  • 24. 

    A view is which of the following?

    • A.

      A virtual table that can be accessed via SQL commands

    • B.

      A virtual table that cannot be accessed via SQL commands

    • C.

      A base table that can be accessed via SQL commands

    • D.

      A base table that cannot be accessed via SQL commands

    Correct Answer
    A. A virtual table that can be accessed via SQL commands
    Explanation
    A view is a virtual table that can be accessed via SQL commands. It is a logical representation of data from one or more tables in the database. Views can be used to simplify complex queries, provide restricted access to data, or present data in a different format. They do not store any data themselves but retrieve data from the underlying tables. Users can query a view using SQL commands just like they would query a regular table, and the view will return the desired results based on the defined logic.

    Rate this question:

  • 25. 

    ON UPDATE CASCADE ensures which of the following?

    • A.

      Normalization

    • B.

      Data Integrity

    • C.

      Materialized Views

    • D.

      All of the above.

    Correct Answer
    B. Data Integrity
    Explanation
    ON UPDATE CASCADE ensures data integrity. When a row in the referenced table is updated, ON UPDATE CASCADE automatically updates the corresponding rows in the referencing table. This ensures that the integrity of the data is maintained across the tables.

    Rate this question:

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Apr 03, 2024
    Quiz Edited by
    ProProfs Editorial Team
  • Dec 10, 2011
    Quiz Created by
    Anishjraveendran
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.