0% found this document useful (0 votes)
6 views3 pages

ASP NET CSharp SQL Interview MCQs

The document contains a series of questions and answers related to ASP.NET, C#, and SQL Server. It covers topics such as authentication modes, configuration files, ViewState, data types, exception handling, SQL commands, and constraints. Each question is followed by the correct answer, providing a quick reference for key concepts in these technologies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

ASP NET CSharp SQL Interview MCQs

The document contains a series of questions and answers related to ASP.NET, C#, and SQL Server. It covers topics such as authentication modes, configuration files, ViewState, data types, exception handling, SQL commands, and constraints. Each question is followed by the correct answer, providing a quick reference for key concepts in these technologies.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

### ASP.

NET ###

Q1. What is the default authentication mode in ASP.NET?

a) Forms
b) Windows
c) Passport
d) None
Answer: b) Windows

Q2. Which file is used to configure application-level settings in ASP.NET?

a) machine.config
b) web.config
c) app.config
d) global.asax
Answer: b) web.config

Q3. What is ViewState used for in ASP.NET?

a) Server-side data storage


b) Database operations
c) Maintaining state of controls
d) Session management
Answer: c) Maintaining state of controls

Q4. Which control is used to display data in a tabular format?

a) TextBox
b) GridView
c) Label
d) Button
Answer: b) GridView

Q5. What is the extension of an ASP.NET Web Form?

a) .html
b) .aspx
c) .asp
d) .php
Answer: b) .aspx

### C# ###

Q1. Which of the following is a value type in C#?

a) String
b) Object
c) Int
d) Array
Answer: c) Int

Q2. What is boxing in C#?

a) Converting object to value type


b) Converting value type to object
c) Packing code into functions
d) None of the above
Answer: b) Converting value type to object

Q3. Which keyword is used to define a method that can be overridden in derived
class?

a) static
b) override
c) virtual
d) abstract
Answer: c) virtual

Q4. Which operator is used to handle exceptions in C#?

a) try
b) catch
c) finally
d) All of the above
Answer: d) All of the above

Q5. What does the `using` statement do in C#?

a) Imports a namespace
b) Manages resources
c) Declares variables
d) Both a and b
Answer: d) Both a and b

### SQL Server ###

Q1. Which SQL command is used to extract data from a database?

a) GET
b) SELECT
c) EXTRACT
d) OPEN
Answer: b) SELECT

Q2. Which constraint ensures all values in a column are unique?

a) PRIMARY KEY
b) UNIQUE
c) NOT NULL
d) CHECK
Answer: b) UNIQUE

Q3. What is the purpose of the `JOIN` clause?

a) Insert data
b) Delete data
c) Combine rows from multiple tables
d) Format data
Answer: c) Combine rows from multiple tables

Q4. Which function returns the current date and time in SQL Server?

a) NOW()
b) GETDATE()
c) CURRENT_TIMESTAMP()
d) SYSDATE()
Answer: b) GETDATE()

Q5. What does the `GROUP BY` clause do?

a) Filters rows
b) Aggregates data
c) Joins tables
d) Sorts results
Answer: b) Aggregates data

You might also like