0% found this document useful (0 votes)
9 views14 pages

Full 100 ASP NET CSharp SQL Interview MCQs

The document contains a series of questions and answers related to ASP.NET, C#, and SQL Server. Key topics include authentication modes, configuration files, ViewState, data display controls, value types, boxing, exception handling, and SQL commands. Each section provides multiple-choice questions with the correct answers indicated.
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)
9 views14 pages

Full 100 ASP NET CSharp SQL Interview MCQs

The document contains a series of questions and answers related to ASP.NET, C#, and SQL Server. Key topics include authentication modes, configuration files, ViewState, data display controls, value types, boxing, exception handling, and SQL commands. Each section provides multiple-choice questions with the correct answers indicated.
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/ 14

### 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

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

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

Q7. 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

Q8. 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

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

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

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

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

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

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

Q12. 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

Q13. 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

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

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

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

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

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

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

Q17. 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

Q18. 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

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

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

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

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

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

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

Q22. 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
Q23. 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

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

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

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

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

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

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

Q27. 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

Q28. 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

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

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

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


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

### C# ###

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

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

Q32. 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

Q33. 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

Q34. 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

Q35. 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

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

a) String
b) Object
c) Int
d) Array
Answer: c) Int
Q37. 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

Q38. 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

Q39. 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

Q40. 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

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

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

Q42. 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

Q43. 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

Q44. 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

Q45. 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

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

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

Q47. 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

Q48. 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

Q49. 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

Q50. 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

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

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

Q52. 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

Q53. 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

Q54. 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

Q55. 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

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

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

Q57. 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

Q58. 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

Q59. 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

Q60. 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

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

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

Q62. 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

Q63. 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

Q64. 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

Q65. 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

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

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

Q67. 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

Q68. 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

Q69. 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

Q70. 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 ###

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

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

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

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

Q73. 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

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

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

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

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

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

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

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

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

Q78. 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

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

a) NOW()
b) GETDATE()
c) CURRENT_TIMESTAMP()
d) SYSDATE()
Answer: b) GETDATE()
Q80. What does the `GROUP BY` clause do?

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

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

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

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

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

Q83. 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

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

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

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

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

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

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

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


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

Q88. 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

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

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

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

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

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

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

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

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

Q93. 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

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

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

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

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

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

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

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

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

Q98. 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

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

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

Q100. 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