Odesk & Elance ASP.NET 3.5/2.0 C# test answers

Hi Friends,
Today i am sharing with you 100% corrected answer of oDesk & Elance  ASP.NET 3.5/2.0 C# test answer. if you have another information or suggest about oDesk & Elance  ASP.NET 3.5/2.0 C# test answer. Please post a comment below and share your experience with us.


Odesk & Elance ASP.NET 3.5/2.0 C# test answers

Ques.1
Which of the following is/are applicable while using Server Socket Level communications?

a.     A certificate must be installed on the server.
b.    The certificate must match the web address to prevent a browser warning or error.
c.     The certificate must be issued by an authority recognized by the client computer to prevent a browser warning or error.
d.    All of the above.

The answer is: d. All of the above.


Ques.2
In which file are Predefined Client Side Validation Scripts defined?

a.     WebUIValidation.js
b.    ClientValidation.js
c.     AspNetValidation.js
d.    UserValidation.js

The answer in: b. ClientValidation.js


Ques.3
Which of the following are true regarding the System.Collections.Generic.HashSet<T> class?

a.     HashSet is an unordered collection.
b.    The default EqualityComparer checks whether the element supplied to the HashSet is unique or not.
c.     HashSet provides functionality for “conceptual sets” where the rules for membership can be specified without actually creating all of the items.

The  answer is: b.  The default EqualityComparer checks whether the element supplied to the HashSet is unique or not.


Ques.4
Which of the following are true about Extension methods.

a.     They can be either declared either static or instance members.
b.    They must be declared in the same assembly (but may be in different source files)
c.     Extension methods can be used to override existing instance methods.
d.    Extension methods with the same signature for the same class may be declared in multiple namespaces without causing compilation errors.

The answer is: a. They can be either declared either static or instance members.


Ques.5
Which of the following conditions can trigger the automatic recycling of an ASP.NET application hosted in IIS?

a.     A specific number of requests to the application process.
b.    A percentage of physical memory utilized by the process.
c.     A specific time interval
d.    All of the above

The answer is: d. All of the above


Ques.6
Via which of the following is ViewState maintained by default?

a.     A hidden variable within the page that is included with each round tip.
b.    A cookie which resides on the client’s computer.
c.     A server side in-process memory cache.
d.    Instance memory variables of the Page class.

The answer is: a. A hidden variable within the page that is included with each round tip.

  

Ques.7
Which of the following are true about System.Security,Cryptography under version 3.5 of the framework?

a.     Support is provided for the “Suite B” set of cryptographic algorithms as specified by the National Security Agency(NSA).
b.    Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
c.     The System.Security.Cryptography.AesManaged.class allows custom block size , iteration counts and feedback modes to support any Rijndael based encryption.

The answer is: b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.


Ques.8
Which of the following are recqired to be true by objects which are going to be used as keys in a System.Collections.HashTable?

a.     They must handle case-senstivity identically in both the GetHashCode() and Equals() methods.
b.    Key objects must be immutable for the duration they are usedwithin a HashTable.
c.     Get HashCode() must be overridden to provide the same result, given the same parameters, regardless of reference equality unless the HashTable constructor is provided with an IEqalitycomparer parameter.
d.    Each Element in a HashTable is stored as a Key/Value pair of the type System.Collections.DictionaryElement
e.     All of the above

The answer is: e. All of the above.


Ques.9
Which of the following can be used to control caching within an ASP.NET application?

a.     Using the @OutputCache directive in the .aspx file.
b.    Setting the HttpCachePolicy of the Cache property inside the Response object.
c.     Using the Cache property of the Page object.
d.    All of the above

The answer is: a. Using the @OutputCache directive in the .aspx file.


Ques.10
Which of the following are included in the advantages of  Lambda Expressions over Anonymous methods?

a.     More concise syntax
b.    The types of a Lambda Expression may be omitted
c.     The body of an anonymous method can not be an expression
d.    Lambda Expressions permit deferred type inference, that anonymous methods do not
e.     All of the above

The answer is: a. More concise syntax


Ques.11
Which of the following does using Initializer Syntax with a collections as shown below require?
CollectionClass<int> numbers = new CollectionClass<int> {0,1,2,3,4,5,6,7,8,9};

a.     Collection class must implement
System.Collections.Generic.ICollection<T>
b.    Collection Class must implement
System.Collections.Generic.IList<T>
c.     Each of the items in the Initializer  List will be passed to the Add<T>(T item) method

The answer is: b. Collection Class must implement
System.Collections.Generic.IList<T>  and  c. Each of the items in the Initializer  List will be passed to the Add<T>(T item) method



 Ques.12:
Which of the following are true about System.Security.Cryptography under version 3.5 of the framework?


    a.    Support is provided for the "Suite B" set of cryptographic algorithms as specified by the National    Security Agency (NSA).
    b.    Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
    c.    The System.Security.Cryptography.AesManaged class allows custom block size, iteration counts and feedback modes to support any Rijndael based encryption.

 the answer is:    b.    Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.


Ques.13:
Which of the following types guarantee atomic reads and writes?


    a.    int
    b.    double
    c.    long
    d.    float
 the answer is:    a.  int  and   d.  float


Ques.14:
Which of the following is false about declarative attributes?


    a.    They must be inherited from the System.Attribute.
    b.    Attribute classes may be restricted to be applied only to application element types.
    c.    By default, a given attribute may be applied multiple times to the same application element.
 the answer is.    b.   Attribute classes may be restricted to be applied only to application element types.



Ques.15:    When deleting a data row from the data row collection of a data table,you can

a.Use the DataRowCollection.Remove method to immediately delete the row.
b. Use the DataRowCollection.Remove method to mark the row for deletion when    DataRow.AcceptChanges is called.
c. Use the DataRow.Delete method to immediately delete the row.
d. Use the DataRow.Delete method to mark the row for deletion when DataRowAcceptChanges is called.

The answer is : (a). Use the DataRowCollection.Remove method to immediately delete the row.  And   (d).  Use the DataRow.Delete method to mark the row for deletion when DataRowAcceptChanges is called.


Ques.16:Which of the following is NOT a valid C# preprocessor directive?


    a.    #define
    b.    #line
    c.    #include
    d.     #error
    e.    #pragma
the answer is: e: #pragma


 Ques.17:
When developing a managed client to be used with an existing COM component.________

    a.    you should modify the COM component to enable CLR functionality.
    b.    you should use Tlblmp.exe to create a managed wrapper.
    c.    you should use TlbExp.exe to create a managed wrapper.
    d.   you should enable an unsafe code.



 
 the answer is: a. you should modify the COM component to enable CLR functionality.

Ques.18:
Which of the following is true about C# generics?
a.     C# allows non-type template parameters.
b.    C# supports explicit specialization.
c.     C# allows the type parameter to be used as the base class for generic type.
d.    C# allows a generic type parameter itself to be a generic.
e.     C# enforces that all codes are valid for all types of parameters.


The  answer is: d.   C# allows a generic type parameter itself to be a generic.


Ques.19
Which of the following are true about namespaces & assemblies?

a.     A single assembly may contain multiple namespaces.
b.    The same namespace may be used in multiple assemblies.
c.     Namespaces may be aliased to provide a shorthand notation for a fully qualified identifier.
d.    All of the above.


The answer is: d. All of the above.


Ques.20
Which of the following are valid as the underlying type for an enumeration?

a.     Int
b.    Sbyte
c.     Long
d.    All of the above

The answer is: a. Int


Ques.21
Elements in System.Collections.Specialized.OrderedDictionary are:

a.     Sorted by Key
b.    Sorted by element
c.     Not sorted

The answer is: a: Sorted by key


Ques22.
Which of the following types are derived from System.Reflection.MemberInfo?

a.     System.Reflection.PropertyInfo
b.    System.Reflection.EventInfo
c.     System.Type
d.    System.Refection.InstanceInfo

The answer is:  a. System.Refection.PropertyInfo
                              b. System.Refection.EventInfo  


Ques23.
Which of the following is false about declarative attributes?

a.     They must be inherited from the System Attribute.
b.    Attribute classes may be restricted to be applied only to the application element types.
c.     By default, a given attribute may be applied multiple times to the same application element.

The answer is: b. Attribute classes may be restricted to be applied only to the application element types.


Ques.24
Custom non-fatal exceptions should be derived from:

a.     ApplicationException
b.    DataMisalignedException
c.     ExecutionEngineException
d.    SystemException

The answer is: a.  ApplicationException

0 comments: