oDesk ASP.NET 3.5 Test Answer 2015
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.
ANS: d. All of the above.
2. In which file are Predefined Client Side Validation Scripts defined?
a. WebUIValidation.js
b. ClientValidation.js
c. AspNetValidation.js
d. UserValidation.js
ANS: b. ClientValidation.js
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.
ANS: b. The default EqualityComparer checks whether the element supplied to the HashSet is unique or not.
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.
ANS: a. They can be either declared either static or instance members.
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
ANS: d. All of the above
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.
ANS: a. A hidden variable within the page that is included with each round tip.
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.
ANS: b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
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
ANS: e. All of the above.
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
ANS: a. Using the @OutputCache directive in the .aspx file.
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
ANS: a. More concise syntax
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
ANS: 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
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.
ANS: b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
13: Which of the following types guarantee atomic reads and writes?
a. int
b. double
c. long
d. float
ANS: a. int and d. float
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.
ANS. b. Attribute classes may be restricted to be applied only to application element types.
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.
ANS : (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.
16: Which of the following is NOT a valid C# preprocessor directive?
a. #define
b. #line
c. #include
d. #error
e. #pragma
ANS: e: #pragma
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.
ANS: a. you should modify the COM component to enable CLR functionality.
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.
ANS: d. C# allows a generic type parameter itself to be a generic.
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.
ANS: d. All of the above.
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
ANS: a. Int
21. Elements in System.Collections.Specialized.OrderedDictionary are:
a. Sorted by Key
b. Sorted by element
c. Not sorted
ANS: a: Sorted by key
22. 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
ANS: a. System.Refection.PropertyInfo
b. System.Refection.EventInfo
23. 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.
ANS: b. Attribute classes may be restricted to be applied only to the application element types.
24. Custom non-fatal exceptions should be derived from:
a. ApplicationException
b. DataMisalignedException
c. ExecutionEngineException
d. SystemException
ANS: a. ApplicationException
0 comments:
Post a Comment