Monday, March 24, 2008

.NET WebDev interview questions - Part 2 @ Tech Interviews.com

.NET WebDev interview questions - Part 2 @ Tech Interviews.com
  1. A structure in C# can be derived from one or more
    • class
    • interface
    • both
    • none
  2. State True or False: Static method cannot be overridden
    • True
    • False
  3. The Equivalent HTML Control for the tag is
    • HtmlInput
    • HtmlButton
    • HtmlPushButton
    • HtmlInputButton
  4. The Equivalent Html Control for the tag is
    • HtmlCheckBox
    • HtmlInputChkBox
    • HtmlInputCheckBox
    • HtmlInputTypeChkBox
  5. Which operator is used for connecting a event with a procedure in C#?
    • +=
    • =
    • both
    • none
  6. The Equivalent Html Control for the



  7. State True or False: Events in Web forms are processed before the “Page Load” event
    • True
    • False
  8. What namespaces are necessary to create a localized application?
    • System.Globalization
    • System.Globalization and System.Resources.
    • System.Resources.
    • System.Array
  9. A new server-side control can be created by implementing the class ___________
    • System.Web.WebControl
    • System.Web.UI.WebControl
    • System.Web.UI.WebControls.WebControl
    • Any one of the above
  10. The parameter “clienttarget = downlevel” does one of the following
    • Adds aliases for specific user agents to an internal collection of user agent aliases
    • Indicates the useragents level of validating the controls
    • Disables all DHTML events(including Validation controls)
    • None of the above
  11. The methods in C# can be overloaded in which of the following ways
    • By having the same method name and specifying different number of parameters
    • By giving different method names and same number of parameters
    • By having the same method name and specifying different types of parameters
    • By giving different method names and same types of parameters
  12. The RangeValidator control supports the following datatype
    • Integer and String
    • Integer, Float, String, XMLDatatypes
    • Integer, String and Date
    • Integer, Boolean, Short, String and Date
  13. What is the difference between Convert.ToInt32 and int.Parse?
    • Both are same and both can handle null value.
    • Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.
    • int.Parse can handle null value but Convert.ToInt32 throws ArgumentNullException error.
    • Both Convert.ToInt32 and int.Parse cannot handle null value.
  14. State True or False: Any ODBC-compliant database can be accessed through ASP.NET
    • True
    • False
  15. You need to select a .NET language that has auto-documenting features built into the source code and compiler. Given the scenario above what language compiler should be selected?
    • vbc.exe
    • cl.exe
    • ilasm.exe
    • cs.exe
  16. A set of tables are maintained in a Dataset as
    • TablesCollection object
    • DataTableCollection object
    • DataRowsCollection object
    • TableRowCollection object
  17. The namespaces needed to use data mechanisms in ASP.NET pages are
    • System.Data, System.Data.OleDb or System.Data.SQL
    • System.Data, System.Data.ODBC
    • System.Data, System.Data.DataRow
    • System.Data.DataRowCollection, System.Data.DbType
  18. What are the different methods to access Database in .NET ?
    • OleDB,ODBC,SQLClient
    • OleDB, JDBC, SQLServer
    • ODBC-JDBC, DataSet, SQLClient
    • Datasource, DataSet, DSN
  19. The two properties of a DataGrid that has to be specified to turn on sorting and paging respectively are
    • EnableSorting = “true” and EnablePaging = “true”
    • DisableSorting = “false” and DisablePaging = “false”
    • AllowSorting = “true” and AllowPaging = “true”
    • Sorting = “true” and Paging = “true”
  20. Which one of the following objects is used to create a foreign key between two DataTables?
    • DataRelation
    • DataRelationship
    • DataConstraint
    • DataKey
  21. The Syntax for data-binding expressions is
    • <%# property or collection %>
    • <%# property or collection #%>
    • <%$ property or collection %>
    • <%@ property or collection %>
  22. The method that need to be invoked on the DataAdapter control to load the generated dataset with data is
    • Bind()
    • Fill()
    • FillData()
    • SetData()
  23. Which of the following operations can you NOT perform on an ADO.NET DataSet?
    • A DataSet can be synchronised with the database.
    • A DataSet can be synchronised with a RecordSet.
    • A DataSet can be converted to XML.
    • You can infer the schema from a DataSet
  24. Which is the correct statement to set the alias name for namespace in C#?
    • using System Data.OracleClient = aliasName;
    • using aliasName = System.Data.OracleClient;
    • string aliasName = using.System.Data.OracleClient;
    • Both a & b
  25. The property that indicates whether existing database constraints should be observed when performing updates
    • EnforceConstraints
    • Constraints
    • GetConstraints
    • ConstraintsEnforce

63 Responses to “.NET WebDev interview questions - Part 2”

  1. Sasidhara Kumar Karasi (sasi.karasi@gmail.com) Says:

    1. A structure in C# can be derived from one or more

    * class
    * interface
    * both
    * none

    Ans: interface.

    Like classes, C# struct can also implement from an interface.
    Ex:-

    // Author: Sasi

    Using System;

    interface DemoInterface
    {
    void mDemo();
    }

    struct DemoStruct : DemoInterface
    {
    public void mDemo()
    {
    Console.WriteLine(”Structure Can Implement from Interface :-)”);
    }

    }

    class DemoClass
    {
    public static void Main()
    {
    DemoStruct ds = new DemoStruct();
    ds.mDemo();
    }
    }

    ______________________
    Sasi.

  2. Sasidhara Kumar Karasi (sasi.karasi@gmail.com) Says:

    2. State True or False: Static method cannot be overridden

    * True
    * False

    Ans: True

    You cannot override a non-virtual or static method. The overridden base method must be virtual, abstract, or override.

    _________________
    Sasi.

  3. Sasidhara Kumar Karasi (sasi.karasi@gmail.com) Says:

    3. The Equivalent HTML Control for the tag is

    * HtmlInput
    * HtmlButton
    * HtmlPushButton
    * HtmlInputButton

    Ans: HtmlInputButton.

    We can use the HtmlInputButton control to program against the , , and HTML elements.

    ______________________
    Sasi.

  4. Sasidhara Kumar Karasi (sasi.karasi@gmail.com) Says:

    4. The Equivalent Html Control for the tag is

    * HtmlCheckBox
    * HtmlInputChkBox
    * HtmlInputCheckBox
    * HtmlInputTypeChkBox

    Ans: HtmlInputCheckbox

    __________________
    Sasi.

  5. Sasidhara Kumar Karasi (sasi.karasi@gmail.com) Says:

    5. Which operator is used for connecting a event with a procedure in C#?

    * +=
    * =
    * both
    * none

    Ans: +=

    ___________
    Sasi.

  6. Sasidhara Kumar Karasi (sasi.karasi@gmail.com) Says:

    6. The Equivalent Html Control for the tag is

    *
    *
    *
    *

    Ans:

    System.Object
    System.Web.UI.Control
    System.Web.UI.HtmlControls.HtmlControl
    System.Web.UI.HtmlControls.HtmlContainerControl
    System.Web.UI.HtmlControls.HtmlSelect

    _______________
    Sasi.

  7. Sasidhara Kumar Karasi Says:

    9. A new server-side control can be created by implementing the class ___________

    * System.Web.WebControl
    * System.Web.UI.WebControl
    * System.Web.UI.WebControls.WebControl
    * Any one of the above

    Ans: System.Web.UI.WebControls.WebControl

    ________
    Sasi. :-)
    —-

  8. webdeveloper Says:

    Q 3 HtmlInputButton

    Q4 HtmlInputCheckBox

    Q5 +=
    Q6 HtmlSelect
    Q7 TRUE
    Q8 System.Globalization and System.Resources.

    Q11 A and C
    Q14 true
    q15 cs.exe
    Q16 A set of DataTableCollection .
    Q19 AllowSorting = “true” and AllowPaging = “true”

  9. rong Says:

    8. What namespaces are necessary to create a localized application?
    Ans: System.Resources

  10. rong Says:

    8.What namespaces are necessary to create a localized application?

    Ans: System.Globalization and System.Resources.

  11. Sandeep Prakash Says:

    21. The Syntax for data-binding expressions is
    B

  12. Harish Says:

    Q13 - Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error

  13. Harish Says:

    Q21 Ans :-

  14. Harish Says:

    Q22 Ans :- Fill()
    Q23 Ans :- A DataSet can be synchronised with a RecordSet.
    Q24 Ans :- using aliasName = System.Data.OracleClient;
    Q25 Ans :- EnforceConstraints

  15. Harish Says:

    Q12 Ans :- Integer, String and Date
    Q20 Ans :- DataConstraint

  16. pavan Says:

    18)ans:a

  17. N.RAGHAVENDRA HARI Says:

    WHAT IS THE DIFF B/W TRIGGER AND VIEWS AND THEIR IMPORTANCE IN DBMS

  18. Stephany Says:

    1 A structure in C# can be derived from one or more
    o class
    o interface
    o both
    o none
    Answer:
    interface

  19. Stephany Says:

    2 State True or False: Static method cannot be overridden
    o True
    o False

    Answer: True

  20. Stephany Says:

    3 The Equivalent HTML Control for the tag is
    o HtmlInput
    o HtmlButton
    o HtmlPushButton
    o HtmlInputButton
    Answer: HtmlInputButton

  21. Stephany Says:

    4 The Equivalent Html Control for the tag is
    o HtmlCheckBox
    o HtmlInputChkBox
    o HtmlInputCheckBox
    o HtmlInputTypeChkBox

    Answer: HtmlInputCheckBox

  22. Stephany Says:

    5 Which operator is used for connecting a event with a procedure in C#?
    o +=
    o =
    o both
    o none
    Answer: +=

  23. Stephany Says:

    6 The Equivalent Html Control for the tag is
    o
    o
    o
    o

    Answer: HtmlSelect

  24. Stephany Says:

    7 State True or False: Events in Web forms are processed before the “Page Load” event
    o True
    o False
    Answer: True

  25. Stephany Says:

    8 What namespaces are necessary to create a localized application?
    o System.Globalization
    o System.Globalization and System.Resources.
    o System.Resources.
    o System.Array

    Answer: System.Globalization and System.Resources

  26. Stephany Says:

    9 A new server-side control can be created by implementing the class ___________
    o System.Web.WebControl
    o System.Web.UI.WebControl
    o System.Web.UI.WebControls.WebControl
    o Any one of the above

    Answer: System.Web.UI.WebControls.WebControl

  27. Stephany Says:

    10 The parameter “clienttarget = downlevel” does one of the following
    o Adds aliases for specific user agents to an internal collection of user agent aliases
    o Indicates the useragents level of validating the controls
    o Disables all DHTML events(including Validation controls)
    o None of the above
    Answer:
    None of the above

  28. Stephany Says:

    11 The methods in C# can be overloaded in which of the following ways
    o By having the same method name and specifying different number of parameters
    o By giving different method names and same number of parameters
    o By having the same method name and specifying different types of parameters
    o By giving different method names and same types of parameters
    Answer:
    By having the same method name and specifying different number of parameters
    By having the same method name and specifying different types of parameters

  29. Stephany Says:

    12 The RangeValidator control supports the following datatype
    o Integer and String
    o Integer, Float, String, XMLDatatypes
    o Integer, String and Date
    o Integer, Boolean, Short, String and Date
    Answer:
    Integer, String and Date

  30. Stephany Says:

    13 What is the difference between Convert.ToInt32 and int.Parse?
    o Both are same and both can handle null value.
    o Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.
    o int.Parse can handle null value but Convert.ToInt32 throws ArgumentNullException error.
    o Both Convert.ToInt32 and int.Parse cannot handle null value.
    Answer:

    Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.

  31. Stephany Says:

    14 State True or False: Any ODBC-compliant database can be accessed through ASP.NET
    o True
    o False
    Answer:
    True

  32. Stephany Says:

    15 You need to select a .NET language that has auto-documenting features built into the source code and compiler. Given the scenario above what language compiler should be selected?
    o vbc.exe
    o cl.exe
    o ilasm.exe
    o cs.exe

    Answer: cs.exe

  33. Stephany Says:

    16 A set of tables are maintained in a Dataset as
    o TablesCollection object
    o DataTableCollection object
    o DataRowsCollection object
    o TableRowCollection object
    Answer:
    DataTableCollection object

  34. Stephany Says:

    17 The namespaces needed to use data mechanisms in ASP.NET pages are
    o System.Data, System.Data.OleDb or System.Data.SQL
    o System.Data, System.Data.ODBC
    o System.Data, System.Data.DataRow
    o System.Data.DataRowCollection, System.Data.DbType

    Answer:
    System.Data, System.Data.OleDb or System.Data.SQL

  35. Stephany Says:

    18 What are the different methods to access Database in .NET ?
    o OleDB,ODBC,SQLClient
    o OleDB, JDBC, SQLServer
    o ODBC-JDBC, DataSet, SQLClient
    o Datasource, DataSet, DSN

    Answer:
    OleDB,ODBC,SQLClient

  36. Stephany Says:

    19 The two properties of a DataGrid that has to be specified to turn on sorting and paging respectively are
    o EnableSorting = “true” and EnablePaging = “true”
    o DisableSorting = “false” and DisablePaging = “false”
    o AllowSorting = “true” and AllowPaging = “true”
    o Sorting = “true” and Paging = “true”
    Answer:
    AllowSorting = “true” and AllowPaging = “true

  37. Stephany Says:

    20 Which one of the following objects is used to create a foreign key between two DataTables?
    o DataRelation
    o DataRelationship
    o DataConstraint
    o DataKey
    Answer:
    DataRelation

  38. Stephany Says:

    21 The Syntax for data-binding expressions is
    o %# property or collection %
    o %# property or collection #%
    o %$ property or collection %
    o %@ property or collection %
    Answer:
    %# property or collection %

  39. Stephany Says:

    22 The method that need to be invoked on the DataAdapter control to load the generated dataset with data is
    o Bind()
    o Fill()
    o FillData()
    o SetData()
    Answer:
    Fill()

  40. Stephany Says:

    23 Which of the following operations can you NOT perform on an ADO.NET DataSet?
    o A DataSet can be synchronised with the database.
    o A DataSet can be synchronised with a RecordSet.
    o A DataSet can be converted to XML.
    o You can infer the schema from a DataSet
    Answer:
    A DataSet can be synchronised with a RecordSet

  41. Stephany Says:

    24 Which is the correct statement to set the alias name for namespace in C#?
    o using System Data.OracleClient = aliasName;
    o using aliasName = System.Data.OracleClient;
    o string aliasName = using.System.Data.OracleClient;
    o Both a & b
    Answer:
    using aliasName = System.Data.OracleClient;

  42. Stephany Says:

    25 The property that indicates whether existing database constraints should be observed when performing updates
    o EnforceConstraints
    o Constraints
    o GetConstraints
    o ConstraintsEnforce
    Answer:
    EnforceConstraints

  43. roopa Says:

    1. A structure in C# can be derived from one or more
    class
    interface
    both
    none

    Ans-interface

    2 State True or False: Static method cannot be overridden
    True
    False

    ans-true

    3. The Equivalent HTML Control for the tag is
    HtmlInput
    HtmlButton
    HtmlPushButton
    HtmlInputButton

    ans-htmlInputButton

    4. The Equivalent Html Control for the tag is
    HtmlCheckBox
    HtmlInputChkBox
    HtmlInputCheckBox
    HtmlInputTypeChkBox

    ans-HtmlInputCheckbox

    5. Which operator is used for connecting a event with a procedure in C#?
    +=
    =
    both
    none

    ans- +=

    6. The Equivalent Html Control for the tag is

    ans-HtmlSelect

    7. State True or False: Events in Web forms are processed before the “Page Load” event
    True
    False

    ans-true

    8. What namespaces are necessary to create a localized application?
    System.Globalization
    System.Globalization and System.Resources.
    System.Resources.
    System.Array

    ans-System.Globalization and System.Resources

    9. A new server-side control can be created by implementing the class ___________
    System.Web.WebControl
    System.Web.UI.WebControl
    System.Web.UI.WebControls.WebControl
    Any one of the above

    ans-System.Web.UI.WebControls.WebControl

  44. Gopala Krishna Says:

    WHAT IS THE DIFF B/W TRIGGER AND VIEWS AND THEIR IMPORTANCE IN DBMS

    the answer for this is that trigger is action which we wanna to happen while doin an action such as inserting into database

    views are just used to display and update the database

  45. gargi Says:

    A set of tables are maintained in a Dataset as
    TablesCollection object

  46. Gargi Says:

    The method that need to be invoked on the DataAdapter control to load the generated dataset with data is
    Fill()

  47. surendra parashar Says:

    7. State True or False: Events in Web forms are processed before the “Page Load” event
    True
    False

    Answer - True

  48. Sabyasachi Ghosh Says:

    Can I create my own metadata attributes?

  49. tom Says:

    A static method in C# CAN be overridden in a derived class by using the “new” keyword in the declaration of the overriding method.

  50. Captain Attitude Says:

    Verified via MSDN:

    Stephany is correct on these two:

    20 Which one of the following objects is used to create a foreign key between two DataTables?
    o DataRelation
    o DataRelationship
    o DataConstraint
    o DataKey

    Answer:
    DataRelation (NOT DataConstraint as stated by others in this thread)

    21 The Syntax for data-binding expressions is
    o %# property or collection %
    o %# property or collection #%
    o %$ property or collection %
    o %@ property or collection %

    Answer:
    %# property or collection % (i.e. no ending #)

  51. renuga Says:

    The two properties of a DataGrid that has to be specified to turn on sorting and paging respectively are

    AllowSorting = “true” and AllowPaging = “true”

    Which one of the following objects is used to create a foreign key between two DataTables?
    DataRelation

    The Syntax for data-binding expressions is

    The method that need to be invoked on the DataAdapter control to load the generated dataset with data is
    Fill()

  52. Thiru Says:

    Which one of the following objects is used to create a foreign key between two DataTables?
    DataRelation
    DataRelationship
    DataConstraint
    DataKey

    Ans: DataConstraint

  53. Manju Says:

    Correct answer for question
    * Which one of the following objects is used to create a foreign key between two DataTables?
    is a) DataRelation

  54. Hrach Gyulzadyan Says:

    WHAT IS THE DIFF B/W TRIGGER AND VIEWS AND THEIR IMPORTANCE IN DBMS

    Trigers are doing some action, but views are holding some sql queries in the SQL Server or in another database server. And when you use Views, you just write some simple query instead of huge one, which is beeing hold in the View.

  55. Manju Says:

    #10. Disables all DHTML events(including Validation controls)
    If, for whatever reason, you want to disable client-side form validation, you can do so by adding the following directive at the top of your page -

    OR

  56. Manju Says:

    /* */

  57. Manju Says:

    #13. What is the difference between Convert.ToInt32 and int.Parse?
    B. Convert.ToInt32 can handle null value but int.Parse throws ArgumentNullException error.

  58. Manju Says:

    #17: The namespaces needed to use data mechanisms in ASP.NET pages are
    A: System.Data, System.Data.OleDb or System.Data.SQL

    #18. What are the different methods to access Database in .NET ?
    A: OleDB,ODBC,SQLClient

  59. NTS Says:

    Q22 Ans :- Fill()
    Q23 Ans :- A DataSet can be synchronised with a RecordSet.
    Q24 Ans :- using aliasName = System.Data.OracleClient;

  60. as Says:

    NTS said,
    Q22 Ans :- Fill()
    Q23 Ans :- A DataSet can be synchronised with a RecordSet.
    Q24 Ans :- using aliasName = System.Data.OracleClient;

  61. laxman Says:

    1)select cast(get date() as text) returns
    2)IDENT-current returns
    3)following is not a valid method of HTTP server utility class
    a)execute b)transfer c)mappath

    3) the following cannot be declared using partial modifier
    a)struct b)enum c)interface d)class

  62. Veera Venkata Says:

    Which is the correct statement to set the alias name for namespace in C#?
    using System Data.OracleClient = aliasName;
    using aliasName = System.Data.OracleClient;
    string aliasName = using.System.Data.OracleClient;
    Both a & b

    Ans:using System Data.OracleClient = aliasName;

  63. sujith Says:

    what is the meaning of pipeline in asp.net

No comments:

如何发掘出更多退休的钱?

如何发掘出更多退休的钱? http://bbs.wenxuecity.com/bbs/tzlc/1328415.html 按照常规的说法,退休的收入必须得有退休前的80%,或者是4% withdrawal rule,而且每年还得要加2-3%对付通胀,这是一个很大...