Web Services (WSDL, SOAP & UDDI) – Session 1



Question Bank

Adv .Net and Security in .Net Project

|1. |The Obsolete attribute, which is used to specify a method as obsolete, is provided with the .NET framework. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|2. |The Conditional attribute enables access to the Win32 API. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|3. |When a program is compiled in debug mode, a file with an extension _______ is created. |[0.5] |

| |

| |a) |.DBP |b) |.PDB | |

| |

|4. |In .NET, a dynamic link library is created by default when a project of type console application is built. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|5. |______ are used in C# to add MetaData to classes and assemblies. |[0.5] |

| |

| |a) |Attributes |b) |Properties | |

| |

|6. |C# provides the _______ attribute for interoperability with Windows DLLs. |[0.5] |

| |

| |a) |Conditional |b) |DllImport | |

| |

|7. |When a program is compiled into a release version, it has fewer overheads and also executes faster compared to a |[0.5] |

| |debug version. | |

| |

| |a) |True |b) |False | |

| |

|8. |Windows DLLs have deployment problems like registering the DLL in the Windows registry and versioning issues. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|9. |The code residing inside the Windows Dll is known as _________ code as it has direct access to the memory. |[0.5] |

| |

| |a) |Managed |b) |Unmanaged | |

| |

|10. |Symbol definition should occur ____________ the program. |[0.5] |

| |

| |a) |anywhere in |b) |only at the beginning of | |

| |

|11. |The Win32 API consists of a set of dlls that contain the necessary methods for invoking the system calls. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|12. |The _________ attribute is used to conditionally prevent or allow execution of a block of code. |[0.5] |

| |

| |a) |DllImport |b) |Conditional | |

| |

|13. |An attribute in C# is a declarative tag, which can be used to provide information to the runtime about the |[1.0] |

| |behaviour of the C# elements such as classes only. | |

| |

| |a) |True |b) |False | |

| |

|14. |Statement 1: An obsolete method executes as any normal method. |[1.0] |

| |Statement 2: Specifying a method as obsolete makes the C# compiler generate an error when the program is compiled. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

|15. |Which of the following are the steps involved in creating an attribute? |[1.0] |

| |

| |a) |Enclose the attribute in square brackets. |c) |Multiple attributes for a single method can be | |

| | | | |specified by specifying them one after another | |

| | | | |just before the method name or class element they| |

| | | | |apply to. | |

| |

| |b) |Pass any number of parameters required to the |d) |All of the above. | |

| | |attribute within parenthesis. | | | |

| |

|16. |Which of the following is true? |[1.0] |

| |

| |a) |The DllImport attribute is used to interoperate with|c) |The methods contained within Windows DLLs can be | |

| | |code in unmanaged and legacy components. | |called within C# programs using the DllImport | |

| | | | |attribute. | |

| | |

| |b) |The unmanaged code is the code that has been |d) |All of the above. | |

| | |generated outside the .NET environment. | | | |

| |

|17. |Which namespace has to be imported in applications for working with legacy code? |[1.0] |

| |

| |a) |System.Runtime.Services |c) |System.Services | |

| |

| |b) |System.InteropServices |d) |System.Runtime.InteropServices | |

| |

|18. |Which of the following is true when the first parameter passed to AttributeUsage attribute is AttributeTargets.All |[1.0] |

| |enumerator? | |

| |

| |a) |The attribute can be applied to any class element. |c) |The attribute can be applied only to Enums. | |

| |

| |b) |The attribute can be applied only to constructors. |d) |The attribute can be applied only to Modules. | |

| |

|19. |Which of the following is true when the first parameter passed to AttributeUsage attribute is |[1.0] |

| |AttributeTargets.Constructor enumerator? | |

| |

| |a) |The attribute can be applied to any class element. |c) |The attribute can be applied only to Enums. | |

| | |

| |b) |The attribute can be applied only to constructors. |d) |The attribute can be applied only to Modules. | |

| |

|20. |Which of the following is true when the first parameter passed to AttributeUsage attribute is |[1.0] |

| |AttributeTargets.Module enumerator? | |

| |

| |a) |The attribute can be applied to any class element. |c) |The attribute can be applied only to Enums. | |

| | | | | | |

| |b) |The attribute can be applied only to constructors. |d) |The attribute can be applied only to Modules. | |

| |

|21. |Statement 1: The AllowMultiple property for the AttributeUsage attribute indicates whether the attribute may be |[1.0] |

| |applied to the same item more than once. | |

| |Statement 2: The Inherited property for the AttributeUsage attribute indicates whether the attribute applied to a | |

| |certain class or interface applies to all inherited classes or interfaces. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| | |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|22. |Which of the following is/are true regarding the AttributeUsage attribute? |[1.0] |

| |

| |a) |If the Inherited property is set to true, the |c) |If the AllowMultiple property is set to false, | |

| | |attribute applied to a certain class or interface | |the compiler will generate an error if the | |

| | |will be applied to all inherited classes or | |attribute is applied to the same item more than | |

| | |interfaces. | |once. | |

| |

| |b) |If the Inherited property is set to false, the |d) |If the AllowMultiple property is set to true, the| |

| | |attribute applied to a certain class or interface | |compiler will generate an error if the attribute | |

| | |will be applied to all inherited classes or | |is applied to the same item more than once. | |

| | |interfaces. | | | |

|23. |Statement 1: To read MetaData from a .NET component, the assembly is first loaded into the running process. |[1.0] |

| |Statement 2: Assembly.Load(assemblyName) is a static member method of the Assembly namespace. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|24. |Which of the following is/are true? |[1.0] |

| |

| |a) |The .NET components expose their MetaData through a |c) |The classes necessary for Reflection can be found| |

| | |process known as Reflection. | |in the Namespace System.Reflection. | |

| |

| |b) |Reflection covers the various .NET base classes |d) |All of the above. | |

| | |allowing finding out information about the types in | | | |

| | |programs or assemblies. | | | |

| |

|25. |Which of the following is/are true in relation with the features of Assemblies? |[1.5] |

| |

| |a) |As assemblies are Self-Describing, they do not |d) |The installation of one application does have | |

| | |require registry keys. | |adverse effects on the other applications. | |

| |

| |b) |Due to Versioning, each assembly file reflects or |e) |All of the above. | |

| | |rather exposes the version number to all .NET | | | |

| | |applications. | | | |

| | |

| |c) |Installation of applications are as simple as | | | |

| | |copying the files from one directory to another. | | | |

| |

|26. |Consider the snippet given below: |[1.5] |

| | | |

| |static void Main(string[] args) | |

| |{ | |

| |Assembly asm = Assembly.Load("AttrEx"); | |

| |Type ty =asm.GetType(); | |

| |Attribute[] atb=Attribute.GetCustomAttributes(ty); | |

| |Object ob = atb[0]; | |

| |Console.WriteLine("The attribute value is :" + ob.ToString()); | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |The code above will give a compile time error. |c) |The code above will give a run time error. | |

| | |

| |b) |The code above will display the parameter value |d) |None of the above. | |

| | |passed to attribute existing in the class AttrEx on | | | |

| | |console. | | | |

| |

|27. |Consider the snippet below: |[1.5] |

| | | |

| |public class CoderAttribute : Attribute | |

| |{ | |

| |private string cname; | |

| | | |

| |public CoderAttribute(string cName) | |

| |{ | |

| |ame =cName; | |

| |} | |

| | | |

| |} | |

| | | |

| |Which of the following is/are true regarding the snippet? | |

| |

| |a) |It is mandatory for CoderAttribute class to inherit |c) |It is not necessary for the CoderAttribute class | |

| | |the Attribute class. | |to have a constructor defined within it. | |

| | | | | | |

| |b) |Attribute class belongs to the System namespace. |d) |If the Coder attribute has a single parameter of | |

| | | | |string type, then the CoderAttribute class can | |

| | | | |have a constructor with any number of string | |

| | | | |parameter. | |

| |

|28. |Consider the snippet given below. |[1.5] |

| | | |

| |[CoderAttribute(“Martin”)] | |

| |public void CalculateBonus | |

| |{ | |

| |//Method Implementation | |

| |} | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |The compiler appends the string ‘Attribute’ to the |c) |CoderAttribute is the only custom attribute | |

| | |name CoderAttribute forming the name | |defined for the method CalculateBonus. | |

| | |CoderAttributeAttribute. | | | |

| |

| |b) |The compiler does not append the string ‘Attribute’ |d) |All of the above. | |

| | |to the name but leaves the name as CoderAttribute. | | | |

|29. |Which of the following snippet is correct for the class WriterAttribute with the attribute “Writer” that can be |[1.5] |

| |applied only to the properties? | |

| |

| |a) |[AttributeUsage(AttributeTargets.Method, AllowMultiple=false,Inherited=false)] | |

| | |public class WriterAttribute { | |

| | |…. | |

| | |

| |b) |[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, AllowMultiple=false,Inherited=false)]| |

| | |public class WriterAttribute : Attribute{ | |

| | |…. | |

| | |

| |c) |[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property,AllowMultiple=false, | |

| | |Inherited=false)] | |

| | |public class WriterAttribute { | |

| | |.... | |

| | |

| |d) |[AttributeUsage(AttributeTargets. Property, AllowMultiple=false,Inherited=false)] | |

| | |public class WriterAttribute : Attribute{ | |

| | |…. | |

|30. |Which of the following is the correct syntax, if there are two attributes associated with a method? |[1.5] |

| |

| |a) |… | |

| | |[AttributeName1,AttributeName2](Parameters) | |

| | |MethodName(Parameters) | |

| | |[ | |

| | |//Method Implementation | |

| | |] | |

| | |[AttributeName1(Parameters)] | |

| |

| |b) |… | |

| | |[AttributeName1(Parameters), | |

| | |AttributeName2(Parameters)] | |

| | |MethodName(Parameters) | |

| | |[ | |

| | |//Method Implementation | |

| | |] | |

| |

| |c) |… | |

| | |[AttributeName1(Parameters)] | |

| | |[AttributeName2(Parameters)] | |

| | |MethodName(Parameters) | |

| | |[ | |

| | |//Method Implementation | |

| | |] | |

| |

| |d) |… | |

| | |MethodName(AttributeName1(Parameters) | |

| | |AttributeName2(Parameters)) | |

| | |[ | |

| | |//Method Implementation | |

| | |] | |

| |

|31. |Which of the following is/are true? |[1.5] |

| |

| |a) |A .NET component is a piece of executable code |d) |The CLR can only execute code in assemblies. | |

| | |referred to as Assemblies. | | | |

| |

| |b) |An assembly is a collection of all information |e) |All of the above. | |

| | |required by the runtime to execute an application.| | | |

| | |

| |c) |An assembly can be only a DLL file. | | | |

| |

|32. |Consider the snippet below: |[1.5] |

| | | |

| |[DllImport("Calculation.dll")] | |

| |public static extern int Addition(int a, int b); | |

| |static void Main(string[] args) { | |

| |int ans = Addition(5,2); | |

| |Console.WriteLine("Result : {0}",ans); | |

| |Console.ReadLine(); | |

| |} | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |Windows DLL named Calculation.dll must exist either |d) |The Addition method, imported from the | |

| | |in the application directory or System32 folder | |Calculation.dll, takes in two integer parameters | |

| | |inside the Windows installation directory. | |and returns the result as an integer. | |

| | | | | | |

| |b) |The DLL to import is passed as the parameter to the |e) |The extern keyword in the declaration of imported| |

| | |DllImport attribute. | |method is necessary for using any external | |

| | | | |methods residing in Dlls. | |

| |

| |c) |All of the above. | | | |

| |

|33. |Which of the following is/are true? |[1.5] |

| |

| |a) |An assembly that has been compiled into a PE file |d) |The assembly handles versioning and security | |

| | |has an extension of .exe. | |permissions. | |

| |

| |b) |The *.exe file in .NET Framework is the same as a |e) |All of the above. | |

| | |standalone executable created by a C++ compiler. | | | |

| | | | | | |

| |c) |The PE assembly consists of code in the form of IL | | | |

| | |that requires the .NET platform to be installed on | | | |

| | |the system in order to execute. | | | |

| |

|34. |Consider the snippet below: |[1.5] |

| | | |

| |[Conditional("DEBUG")] | |

| |public static void Msg(string message){ | |

| |Console.WriteLine(message); | |

| |} | |

| |static void Main(string[] args){ | |

| |Console.WriteLine("Before calling | |

| |Msg()"); | |

| |Msg("Working with Attributes"); Console.ReadLine(); | |

| |} | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |The Conditional attribute marking the Msg() method |d) |The compiler will not generate an error if the | |

| | |ensures that the Msg() method will be used only in | |method Msg() does not return a void. | |

| | |debug versions of the solution. | | | |

| | | | | | |

| |b) |The calls to the Msg() method from anywhere in the |e) |All of the above. | |

| | |code in the release version will not be entertained.| | | |

| |

| |c) |The Msg() method is not called in the Release | | | |

| | |version, but compile time errors are thrown. | | | |

|35. |Which of the following is/are true regarding the conditional attribute? |[2.0] |

| |

| |a) |It can only be applied to a complete method as a |c) |If the condition is met, the compiler ignores any| |

| | |unit. | |lines of code anywhere else in the source file | |

| | | | |that calls up the method. | |

| | | | | | |

| |b) |If the condition is not met, the compiler will not |d) |It cannot be applied to a complete method as only| |

| | |compile the code for the method. | |a unit. | |

| |

|36. |Statement 1: Attributes are translated into statements in the compiled code. |[2.0] |

| |Statement 2: Attributes serve as directives to the compiler. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|37. |Statement 1: Attributes can also be applied to individual arguments of a method. |[2.0] |

| |Statement 2: Attribute name can be declared anywhere with respect to the definition of the item in the code. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| | |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| | |

|38. |Which of the following statements is/are true regarding the attribute DllImport? |[2.0] |

| |Statement 1: It is used to mark a method as being defined in an external Dll rather than in any assembly. | |

| |Statement 2: It is used to mark a method as being defined in any assembly. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| | |

|39. |Which of the following is/are true regarding the Conditional attribute? |[2.0] |

| |

| |a) |Any method that returns a void can be marked with |d) |It is used to mark a method as being defined in | |

| | |it. | |an external Dll. | |

| |

| |b) |It is used to give conditional compilation. |e) |All of the above. | |

| |

| |c) |It can be used for debug builds. | | | |

| |

|40. |Which of the following is/are true regarding Reflection? |[2.0] |

| |Statement 1: It allows finding out information about the types in programs or assemblies. | |

| |Statement 2: It can be used to read meta data from assembly manifests. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|41. |Which of the following is/are true? |[2.0] |

| |Statement 1: The Assembly class allows access to the metadata for a given assembly. | |

| |Statement 2: The Assembly class provides methods to allow execute an assembly, which is an executable file. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| | | | | | |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|42. |Which of the methods is/are used to load the corresponding assembly into the running process? |[2.0] |

| |

| |a) |Assembly.AssemblyLoad() |c) |Assembly.Load() | |

| | | | | | |

| |b) |Assembly.OnLoad() |d) |Assembly.LoadFrom() | |

| |

|43. |Consider the snippet given below: |[2.5] |

| | | |

| |#define DEBUG | |

| |… | |

| |… | |

| |[Conditional(“DEBUG”)] | |

| |[Obsolete()] | |

| |public static void DisplayMessage(){ | |

| |Console.WriteLine(“Hello”); | |

| |} | |

| | | |

| |Which of the following is/are true regarding the method DisplayMessage()? | |

| |

| |a) |The above method runs if a debug build takes place. |c) |It gives error during compilation. | |

| |

| |b) |It is an obsolete method. |d) |On using the method the compiler generates a | |

| | | | |warning. | |

| |

|44. |Consider the snippet given below: |[2.5] |

| | | |

| |… | |

| |class ExClass | |

| |{ | |

| |[Conditional(“Using42.dll”)] | |

| |public static extern int MessageBox(int hparent, string | |

| |Message, string caption, int type); | |

| |} | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |The code above generates an error. |c) |The code above must have DllImport attribute to | |

| | | | |make use of the windows API function MessageBox. | |

| |

| |b) |The code above compiles successfully. |d) |The MessageBox() API function is defined in | |

| | | | |Using42.dll. | |

| | | | | | |

|45. |Which of the following is/are true regarding the windows API function MessageBox()? |[2.5] |

| |

| |a) |While using the DllImport attribute, the declaration|d) |The fourth parameter of the method if set to 0, | |

| | |of the method MessageBox must contain the keyword | |ensures that the message box has a button OK. | |

| | |extern. | | | |

| | | | | | |

| |b) |The second parameter of the method indicates a |e) |All of the above | |

| | |string or message to be displayed. | | | |

| |

| |c) |The third parameter of the method indicates a | | | |

| | |caption to be displayed in title bar. | | | |

| |

|46. |Which of the following is/are true? |[2.5] |

| |

| |a) |The Assembly.GetTypes() returns an array of type |d) |The Assembly.GetAttributes() is used to get| |

| | |System.Type containing objects that contain the details of | |the custom attributes attached to an | |

| | |all the types defined in the assembly. | |assembly . | |

| |

| |b) |The Assembly.GetTypes() is used to return an array of |e) |All of the above. | |

| | |System.Type references that contains details of only one | | | |

| | |type. | | | |

| |

| |c) |The Assembly.GetCustomAttributes() is used to get the | | | |

| | |custom attributes attached to an assembly . | | | |

| |

|47. |Which of the following is/are true? |[2.5] |

| |

| |a) |AttributeUsage is primarily used to indicate the |c) |An attribute applied to an assembly can be placed| |

| | |items that the custom attribute can be applied to. | |anywhere in the code but need not be marked with | |

| | | | |the keyword assembly. | |

| |

| |b) |An attribute can be applied to an assembly as a |d) |An attribute applied to an assembly can be placed| |

| | |whole instead of to an element in the code. | |anywhere in the code but must be marked with the | |

| | | | |keyword assembly. | |

| |

|48. |Which of the following is/are true? |[2.5] |

| |

| |a) |Assemblies include metadata such as the types |c) |.NET allows different versions of the same | |

| | |exported from the assembly and a manifest. | |assembly to be used in a single process. | |

| | | | | | |

| |b) |The version of a referenced assembly is stored in |d) |All of the above. | |

| | |the manifest of the assembly. | | | |

| |

|49. |Statement 1: Application Domains allow applications to run independently inside a single process. |[2.5] |

| |Statement 2: Application Domains do not allow applications to run independently inside a single process. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|50. |Statement 1: Private assemblies require registration and versioning. |[2.5] |

| |Statement 2: Private assemblies can have versioning problems, which need to be addressed during development time. | |

| |Statement 3: Windows 2000 introduced the side-by-side feature that allows different versions of the same DLL to be | |

| |used on a system. | |

| |

| |a) |Only statements 1 and 2 are true. |c) |Only statements 2 and 3 are true. | |

| |

| |b) |Only statements 1 and 3 are true. |d) |None of the above statements is true. | |

| |

|51. |An assembly can exist completely within a single file or can span across multiple files. |[0.5] |

| |

| |a) |True |b) |False | |

| | | | | | |

|52. |The .NET metadata is a collection of information existing in ___________ form inside a Portable Executable file. |[0.5] |

| |

| |a) |Hexadecimal |b) |Binary | |

| |

|53. |In Global Assembly Cache, two assemblies with the same name but different versions can exist. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|54. |The .NET compilers compile the source code into an Intermediate Language called _______. |[0.5] |

| |

| |a) |SMIL |b) |MSIL | |

| |

|55. |The files that contain only IL code are known as ___________. |[0.5] |

| |

| |a) |.NET Modules |b) |.NET Packages | |

| |

| 56. |Splitting the code across various modules enables the .NET cross language support. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|57. |A Resource file is a collection of resources like images and sounds. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|58. |The _________ utility comes along with the .NET framework SDK. This utility is used to create resource files. |[0.5] |

| |

| |a) |Resgenerate.exe |b) |Resgen.exe | |

| | | | | | |

|59. |The Image class belongs to the __________ namespace. |[0.5] |

| |

| |a) |System.Drawing |b) |System | |

| |

|60. |A cache is used for storing information __________ |[0.5] |

| |

| |a) |Permanently |b) |Temporarily | |

| |

|61. |Global Assembly Cache is a ________. |[0.5] |

| |

| |a) |File |b) |Directory | |

| | | | | | |

|62. |Private assemblies are the default type of assemblies. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|63. |Which of the following is/are the part(s) of an assembly? |[1.0] |

| |

| |a) |Assembly Metadata |d) |Resources | |

| | | | | | |

| |b) |Type Metadata |e) |All of the above | |

| | | | | | |

| |c) |MSIL Code | | | |

| |

|64. |Statement 1: Version numbers for an assembly are set in the Asembly.cs file that accompanies the project. |[1.0] |

| |Statement 2: The ILDASM tool can be used to view the assembly version number being written into the assembly | |

| |manifest. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| | | | | | |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|65. |Which of the following can be found in an assembly version number? |[1.0] |

| |

| |a) |Majority |c) |Revision | |

| | | | | | |

| |b) |Minority |d) |Build | |

| |

|66. |Statement 1: Strong or unique name must be generated for each and every shared assembly created. |[1.0] |

| |Statement 2: In case of a shared assembly, the assembly file is copied into the applications directory. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| | | | | | |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|67. |Which of the following is/are true? |[1.0] |

| |

| |a) |The gacutil.exe can be used to install and uninstall|c) |The gacutil.exe can be used to list assemblies on| |

| | |assemblies from the GAC using the command line. | |the GAC using the command line. | |

| | | | | | |

| |b) |Private assemblies can be shared across different |d) |All of the above. | |

| | |applications. | | | |

| |

|68. |Which of the following is/are true? |[1.0] |

| |

| |a) |The GAC is a cache for Assemblies. |c) |GAC physically is a directory or a folder. | |

| |

| |b) |Private assemblies need to be stored in GAC. |d) |All of the above. | |

| |

|69. |Which of the command line options is used to get information regarding the assemblies residing in the native image |[1.0] |

| |cache? | |

| |

| |a) |/view |c) |/show | |

| |

| |b) |/display |d) |/open | |

| |

|70. |Which of the following methods in System.Reflection.Assembly |[1.0] |

| |class is used to get the resource names? | |

| |

| |a) |GetManifestResourceNames() |c) |GetResources() | |

| |

| |b) |GetResourceNames() |d) |GetManifestNames() | |

| |

|71. |Statement 1: The return type for the GetObject() method is Object. |[1.0] |

| |Statement 2: The return type for the GetObject() method is Int32. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|72. |Which of the following is/are true? |[1.0] |

| |

| |a) |ResourceWriter class belongs to the System.Resources|c) |The method AddResource() is used to add a | |

| | |namespace. | |resource. | |

| | | | | | |

| |b) |ResourceWriter class allows resources up to 4 |d) |ResourceWriter class allows adding only pictures | |

| | |Gigabytes. | |files to an assembly. | |

| |

|73. |Consider the syntax of resgen utility below: |[1.0] |

| | | |

| |Resgen sub.txt sub.resX | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |It creates a file called sub.resX. |d) |It creates a file called sub.resources. | |

| |

| |b) |It creates HTML-based resource files. |e) |It creates XML-based resource files. | |

| |

|74. |Statement 1: Modules written in different languages like C#, and can be clubbed into a single |[1.0] |

| |assembly. | |

| |Statement 2: Modules written in different languages such as C#, and cannot be clubbed into a | |

| |single assembly. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|75. |Which of the following is/are true regarding the assembly version number? |[1.5] |

| |

| |a) |Change in the major number indicates that the |d) |Change in the build number indicates that a very | |

| | |assembly is incompatible with the previous versions | |minor change has been made to the assembly. | |

| | |of that assembly. | | | |

| | | | | | |

| |b) |Change in the minor number indicates that the |e) |All of the above | |

| | |assembly is compatible with the previous versions of| | | |

| | |that assembly. | | | |

| | | | | | |

| |c) |Change in the revision number indicates that the | | | |

| | |assembly maybe compatible with previous versions of | | | |

| | |that assembly. | | | |

| |

|76. |Which of the following is/are true? |[1.5] |

| |

| |a) |Resources can exist either as part of the .NET |d) |The .NET modules contain the Type Metadata only. | |

| | |assembly or as a separate file. | | | |

| |

| |b) |The .NET modules contain the Type Metadata and the |e) |The MSIL code can exist in separate files. | |

| | |IL code. | | | |

| | | | | | |

| |c) |Assembly Metadata is stored in a module. | | | |

| |

|77. |Which of the following is the functionality of the /upre option of GACUtil utility? |[1.5] |

| |

| |a) |Lists the assemblies from the GAC |c) |Uninstalls the specified assembly on the GAC | |

| |

| |b) |Installs the specified assembly on the GAC |d) |Uninstalls the assembly from the native image | |

| | | | |cache | |

| |

|78. |Which of the following is/are true? |[1.5] |

| |

| |a) |Modules can contain manifests but no assembly |d) |A web browser can get the repeatedly requested | |

| | |metadata inside the manifest. | |data from the cache rather than the original | |

| | | | |server. | |

| | | | | | |

| |b) |It is possible to version a module. |e) |Due to cache, network traffic increases. | |

| |

| |c) |A cache is used for temporarily storing frequently | | | |

| | |used information. | | | |

| |

|79. |Consider the snippet given below: |[1.5] |

| | | |

| |ResourceWriter rw = new ResourceWriter("sub.resources"); | |

| |using(Image img = Image.FromFile("face.jpg")) | |

| |{ | |

| |rw.AddResource("Picture", img); | |

| |rw.AddResource("Description", "My face”); | |

| |rw.Close(); | |

| |} | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |An instance of Image class is created in a using |d) |FileNotFound exception is thrown if the image | |

| | |statement. | |file face.jpg is not present in the applications | |

| | | | |directory. | |

| | | | | | |

| |b) |The object img of the Image class will be disposed |e) |All of the above. | |

| | |once the execution reaches the end of the using | | | |

| | |construct. | | | |

| | | | | | |

| |c) |If the file sub.resources does not exist, an | | | |

| | |exception is generated. | | | |

| |

|80. |Consider the code below that uses the namespace Ex2 with the resource file sub. |[1.5] |

| | | |

| |Assembly ass = Assembly.GetExecutingAssembly(); | |

| |ResourceManager resman=new ResourceManager("Ex2.sub", | |

| |ass); | |

| |PictureBox1.Image = (Image)resman.GetObject("Picture"); | |

| |label1.Text = resman.GetString("Description"); | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |An object ass of type Assembly is declared to hold |d) |Error is generated due to the wrong syntax of | |

| | |the reference to the executing assembly. | |instantiating a ResourceManager object. | |

| | | | | | |

| |b) |System.Resources namespace has to be imported. |e) |All of the above. | |

| | | | | | |

| |c) |Text property of the Label label1 is set with the | | | |

| | |value referred by the key Description in the | | | |

| | |corresponding resource file. | | | |

| |

|81. |Which of the following is/are true? |[1.5] |

| |

| |a) |There is a need to make an assembly a shared |d) |The sn.exe makes use of various cryptographic or | |

| | |assembly to use it in more than one application. | |encryption algorithms. | |

| |

| |b) |Shared assembly must not have naming clashes with |e) |All of the above. | |

| | |other assemblies. | | | |

| |

| |c) |The sn.exe is the utility to make a unique | | | |

| | |identifier across the entire system for shared | | | |

| | |assembly. | | | |

| |

|82. |Which of the following is the functionality of the /i option of GACUtil utility? |[1.5] |

| |

| |a) |Lists the assemblies from the GAC. |c) |Uninstalls the specified assembly on the GAC. | |

| |

| |b) |Installs the specified assembly on the GAC. |d) |Uninstalls the assembly from the native image | |

| | | | |cache. | |

| |

|83. |Which of the following is/are true? |[1.5] |

| |

| |a) |The Global Assembly Cache is a part of Native Image |d) |Ngen.exe utility is used to install an assembly | |

| | |Cache. | |onto the Native Image Cache. | |

| | | | | | |

| |b) |The Native Image Cache stores assemblies in their |e) |All of the above. | |

| | |native machine independent native code. | | | |

| | | | | | |

| |c) |GAC stores assemblies in IL format. | | | |

| |

|84. |Which of the following is the functionality of the /u option of GACUtil utility? |[1.5] |

| |

| |a) |Lists the assemblies from the GAC. |c) |Uninstalls the specified assembly from the GAC. | |

| | | | | | |

| |b) |Installs the specified assembly on the GAC. |d) |Uninstalls the assembly from the native image | |

| | | | |cache. | |

| |

|85. |Which of the following is/are the part(s) of manifest of an assembly? |[2.0] |

| |

| |a) |A list of referenced assemblies. |d) |Exported types included from a module. | |

| | | | | | |

| |b) |A set of permission requests. |e) |All of the above. | |

| |

| |c) |A list of files belonging to this assembly. | | | |

| |

|86. |Statement 1: The reflection mechanism can use the information about the exported types for late binding to classes.|[2.0] |

| |Statement 2: Type-library can be easily generated out of manifest for the use of COM clients. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|87. |Which of the following is/are true regarding modules? |[2.0] |

| |

| |a) |They are only loaded when needed. |d) |They can be used for slower startup of | |

| | | | |assemblies. | |

| |

| |b) |They are DLLs without assembly attributes. |e) |All of the above. | |

| |

| |c) |Usually they do not have assembly metadata and have| | | |

| | |no version information present within it. | | | |

|88. |Which of the following namespaces has/have classes that can be used for the assembly attributes arguments? |[2.0] |

| |

| |a) |System.Reflection |c) |System.Reflection.InteropServices | |

| |

| |b) |System.piler Services |d) |System.Runtime.InteropServices | |

| |

|89. |Statement 1: An assembly can use a resource, not embedded within a DLL file, by referencing through assembly |[2.0] |

| |metadata. | |

| |Statement 2: An assembly metadata can be used to reference a .netmodule file. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|90. |Which of the following is/are true? |[2.0] |

| |

| |a) |The attribute, [assembly] is a global attribute. |c) |The attribute, [module] is a global attribute. | |

| |

| |b) |The attribute, [import] is a global attribute. |d) |Global attributes are not attached to a specific| |

| | | | |language element. | |

| |

|91. |Which of the following is/are true? |[2.0] |

| |

| |a) |Manifest must contain list of files belonging to an|c) |A single assembly can contain any number of | |

| | |assembly. | |files. | |

| |

| |b) |A single assembly must have at least one file. |d) |All of the above. | |

| |

|92. |Statement 1: Manifest is a part of metadata that describes the assembly with all information needed to reference |[2.0] |

| |it. | |

| |Statement 2: Manifest consists of identity name, culture and version but no public key. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|93. |Which of the following is/are true regarding integrity using strong names of .NET assemblies? |[2.5] |

| |

| |a) |When creating a shared component, a public /private|d) |The strong name utility generates a | |

| | |key pair must be used. | |public/private key pair. | |

| |

| |b) |The private key is stored within the assembly. |e) |All of the above. | |

| |

| |c) |The compiler usually writes public key to the | | | |

| | |manifest. | | | |

| |

|94. |Which of the following is/are returned by the FullName property of Assembly class? |[2.5] |

| |

| |a) |The name of the class. |d) |The public key token of the class. | |

| |

| |b) |The version of the class. |e) |All of the above. | |

| |

| |c) |The locality of the class. | | | |

| |

| |

|95. |Consider the snippet given below: |[2.5] |

| | | |

| |[assembly: AssemblyVersion(“1.0.*”)] | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |The above code generates error. |c) |The minor version is 0. | |

| |

| |b) |The major version is 1. |d) |The build and revision numbers are auto | |

| | | | |generated. | |

| |

|96. |Which of the following is/are true? |[2.5] |

| |

| |a) |After compiling the assembly to native code, the |d) |An assembly stored on the Native Image Cache | |

| | |original assembly with the MSIL code can be | |executes faster. | |

| | |deleted. | | | |

| |

| |b) |The native code will be rebuilt if the security |e) |All of the above. | |

| | |changes on the system. | | | |

| |

| |c) |By using the native image generator Ngen.exe, IL | | | |

| | |code is compiled to native code at the time of | | | |

| | |installation. | | | |

| |

|97. |Which of the following is/are true regarding assemblies? |[2.5] |

| |

| |a) |Private assemblies will be used when applications |d) |Private assemblies will be used to build | |

| | |and components are built within the same company. | |assemblies when the component is built by a | |

| | | | |different vendor than the application | |

| |

| |b) |Shared assemblies will be used when the component |e) |All of the above. | |

| | |is built by a different vendor than the | | | |

| | |application. | | | |

| |

| |c) |Shared assemblies will be used when a large | | | |

| | |application is split into sub-projects. | | | |

| |

|98. |Which of the following are the assembly attributes from the System.Reflection namespace? |[2.5] |

| |

| |a) |AssemblyCompany |d) |AssemblyCopyright | |

| |

| |b) |AssemblyInitialization |e) |AssemblyProduct | |

| |

| |c) |AssemblyConfiguration | | | |

| |

|99. |Which of the following is/are true regarding GAC? |[2.5] |

| |

| |a) |Shared assemblies can be installed in GAC. |d) |When .NET components within HTML pages are | |

| | | | |downloaded to the client, it stores assemblies in| |

| | | | |GAC. | |

| |

| |b) |Private assemblies can be installed in GAC. |e) |All of the above. | |

| |

| |c) |The compiled native code goes into GAC if a private | | | |

| | |assembly is compiled to native code using the native| | | |

| | |image generator. | | | |

| |

|100. |Which of the following are true regarding assemblies? |[2.5] |

| |

| |a) |A private assembly can exist in the same directory |d) |A single namespace can spread across various | |

| | |as the application. | |assemblies. | |

| |

| |b) |A private assembly cannot exist within one of the |e) |All of the above. | |

| | |subdirectories of the application. | | | |

| | | | | | |

| |c) |Different namespaces can exist in a single | | | |

| | |assembly. | | | |

| |

|101. |.NET can be thought of as a component technology similar to COM. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|102. |The ________ is an acronym for Type Library Export. |[0.5] |

| |

| |a) |TylbExp |b) |TlbExp | |

| |

|103. |Visual Studio .NET while generating a wrapper for the COM component creates a namespace with a different name than|[0.5] |

| |the COM component. | |

| |

| |a) |True |b) |False | |

| |

|104. |_________ is the proxy used to make the .NET client interact with COM component. |[0.5] |

| |

| |a) |CRW |b) |RCW | |

| |

|105. |Runtime Callable Wrapper is a .NET assembly. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|106. |The _______ interface keeps count of clients connected to a component. |[0.5] |

| |

| |a) |Iknown |b) |IUnknown | |

| |

|107. |Regarding the lifetime of the RCW, exactly one copy of the RCW object is created irrespective of the number of |[0.5] |

| |clients requesting the same COM component. | |

| |

| |a) |True |b) |False | |

| |

|108. |A non-.NET client can call .NET components by referring to them once a .TLB file has been created. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|109. |The _______ utility is used to convert a COM Type Library into a .NET assembly. |[0.5] |

| |

| |a) |TlbExp |b) |TlbImp | |

| |

|110. |_________ is the wrapper object created when a .NET component is called from COM. |[0.5] |

| |

| |a) |CWO |c) |CCW | |

| |

|111. |________ CCW object(s) is/are created for a managed .NET component irrespective of the number of COM clients |[0.5] |

| |trying to access it. | |

| |

| |a) |One |b) |Two | |

| |

|112. |The .NET clients and the COM clients can simultaneously make calls to the same .NET Component. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|113. |Statement 1: COM components manage the lifetime of their object by reference counting whereas in .NET, the CLR |[1.0] |

| |manages the lifetime of the object. | |

| |Statement 2: Marshalling of data is taken care of by RCW. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|114. |Which of the following is/are the way(s) in which COM and .NET components differ? |[1.0] |

| |

| |a) |COM components use interfaces whereas .NET clients |c) |The .NET components manage their lifetime | |

| | |use reflection to learn about the functionality of | |whereas the CLR manages the lifetime for COM | |

| | |the object. | |components. | |

| |

| |b) |COM components use reflection whereas .NET clients |d) |COM components manage their lifetime whereas the| |

| | |use interfaces to learn about the functionality of | |CLR manages the lifetime in .NET. | |

| | |the object. | | | |

| |

|115. |Statement 1: The .NET client talks to a COM component directly without any RCW interface. |[1.0] |

| |Statement 2: Type casting of data types is taken care of by RCW. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|116. |Which of the following is/are true regarding calling a COM component from .NET? |[1.0] |

| |

| |a) |Visual creates a namespace with the same name as the COM component within which all the classes | |

| | |and interfaces exist. | |

| |

| |b) |Objects of the COM wrapper can be created using the namespace created by Visual . | |

| |

| |c) |Objects of the COM wrapper cannot be instantiated using the namespace created by Visual . | |

| |

| |d) |Objects of the COM wrapper cannot be referenced using the namespace created by Visual . | |

| |

|117. |Statement 1: Interoperability between .NET and COM is achieved by creating a proxy class for every COM component |[1.0] |

| |that the .NET client tries to access. | |

| |Statement 2: The proxy talks directly to the COM component, and not to the .NET client. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|118. |Which of the following is/are true? |[1.0] |

| |

| |a) |COM provides language independent code re-use. | |

| |

| |b) |A COM component exposes its functionality through a set of standard interfaces that a COM client uses to | |

| | |communicate. | |

| |

| |c) |A COM component with its GUID needs to be registered in the Windows registry. | |

| |

| |d) |All of the above. | |

| |

|119. |Which of the following is/are true regarding the deployment of .NET application that refers to a COM component? |[1.0] |

| |

| |a) |The deployment of only RCW and the client is not sufficient. | |

| |

| |b) |The deployment of only RCW and the client is sufficient. | |

| |

| |c) |The COM component must also be registered on the machine. | |

| |

| |d) |The COM component need not be registered on the machine. | |

| |

|120. |Statement 1: The RCW maintains pointers to the interface of the COM object it wraps. |[1.0] |

| |Statement 2: The RCW releases its reference on the COM object when it is no longer used. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|121. |Which of the following is/are true regarding CCW and RCW? |[1.0] |

| |

| |a) |The CCW is COM Clearable Wrapper object. |c) |RCW and CCW both contain business logic. | |

| |

| |b) |The CCW always executes in a managed execution |d) |The CCW marshals types from the .NET environment| |

| | |environment. | |to the COM environment. | |

| |

|122. |Which of the following is the syntax for using the RegAsm utility on the file EXAssembly.dll? |[1.0] |

| |

| |a) |RegAsm/install EXAssembly.dll |c) |RegAsm /p EXAssembly.dll | |

| |

| |b) |RegAsm /o EXAssembly.dll |d) |RegAsm | |

| | | | |/ upr EXAssembly.dll | |

| |

|123. |Statement 1: In order to call a .NET component from a COM client, one needs to register the assembly using the |[1.0] |

| |RegAsm utility first and then export a type library from the components manifest using the TlbExp utility. | |

| |Statement 2: In order to call a .NET component from a COM client. one needs to register only the assembly using | |

| |the RegAsm utility. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|124. |Which of the following utility ventures into the assembly’s metadata and manifest and outputs a corresponding COM |[1.0] |

| |type library with an extension .TLB? | |

| |

| |a) |TlibExp |c) |TlibExport | |

| |

| |b) |TlbExp |d) |TlbExport | |

| |

|125. |Which of the following is true regarding CCW? |[1.5] |

| |

| |a) |It is created when a .NET component is called from |d) |It acts as a proxy between the COM component and | |

| | |COM. | |the .NET client. | |

| |

| |b) |It is generated by runtime that reads the metadata |e) |All of the above. | |

| | |information within the assembly. | | | |

| |

| |c) |It bridges the gap between the two environments COM| | | |

| | |. | | | |

| |

|126. |Which of the following is true? |[1.5] |

| |

| |a) |RegAsm.exe is the Assembly Registration Tool. |d) |RegAsm.exe adds information about the .NET | |

| | | | |component to the system registry. | |

| |

| |b) |RegAsm.exe is used to register a .NET class in the |e) |All of the above. | |

| | |windows registry so that COM clients can access it.| | | |

| |

| |c) |RegAsm.exe is not used to unregister a .NET | | | |

| | |component. | | | |

| |

|127. |Which of the following is/are true? |[1.5] |

| |

| |a) |The RCW manages the pointer locations by making a |d) |RCW acts as a mediator to .NET client and the COM| |

| | |cache of pointers. | |component. | |

| |

| |b) |The RCW object is allocated on the heap by the CLR.|e) |All of the above. | |

| |

| |c) |The CLR performs the automatic garbage collection | | | |

| | |of the RCW once it has been de-referenced. | | | |

| |

|128. |Statement 1: COM components return a memory pointer to an object. |[1.5] |

| |Statement 2: COM components must reside in the same memory location throughout the lifetime of the object. | |

| |Statement 3: .NET objects can shift between virtual and physical memory freely as and when either becomes more | |

| |available. | |

| |

| |a) |Only statement 1 is true |d) |Only statement 1 and 3 are true. | |

| |

| |b) |Only statement 2 is true. |e) |Statements 1, 2, 3 are true. | |

| |

| |c) |Only statement 1 and 2 are true. | | | |

| |

|129. |Which of the following is/are the way(s) in which COM components differ from the .NET components? |[1.5] |

| |

| |a) |Lifetime of the object. |c) |Memory Usage. | |

| |

| |b) |Interfaces vs. Reflection. |d) |All of the above. | |

| |

|130. |Statement 1: The process of reflection exposes the type information stored in the form of Metadata in RCW. |[1.5] |

| |Statement 2: The process of reflection helps Visual in reading the type information of RCW to provide | |

| |the IntelliSense. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|131. |Consider a method of a COM component to be called by the .NET client that takes in a string parameter. Which of |[1.5] |

| |the following is/are the type(s) that RCW marshals before passing the call to the COM component? | |

| |

| |a) |BSTR |d) |BSRT | |

| |

| |b) |BTSR |e) |None of the above. | |

| |

| |c) |BRST | | | |

| |

|132. |Which of the following is/are true? |[1.5] |

| |

| |a) |The RCW is a .NET assembly automatically created by|d) |The RCW type information is marshaled from COM | |

| | |Visual in the applications directory. | |types into .NET types and then written into the | |

| | | | |assembly. | |

| |

| |b) |The RCW contains business logic. |e) |Marshalling is the process of converting data | |

| | | | |from one type to another. | |

| |

| |c) |RCW does not contain the type information of the | | | |

| | |elements contained within the COM component. | | | |

| |

|133. |Which of the following is/are true? |[1.5] |

| |

| |a) |The .NET code executes in an execution environment |d) |.NET exposes the classes and methods in an | |

| | |managed by the .NET CLR. | |assembly using metadata and reflection. | |

| |

| |b) |COM code executes in an unmanaged environment. |e) |All of the above. | |

| |

| |c) |COM exposes its classes and methods through | | | |

| | |interfaces. | | | |

| |

|134. |Which of the following is/are true regarding COM components? |[1.5] |

| |

| |a) |It is uniquely identified by a 128-bit GUID. |d) |provides cross-language inheritance. | |

| |

| |b) |It has to be registered in the Windows registry |e) |All of the above. | |

| | |with the GUID. | | | |

| |

| |c) |It provides cross-language code re-use capability. | | | |

| |

|135. |Statement 1: Microsoft provides tools in the .NET SDK for generating COM proxies for .NET components. |[2.0] |

| |Statement 2: Microsoft provides tools in the .NET SDK for generating .NET proxies for COM components. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|136. |Statement 1: COM components can be difficult to code. |[2.0] |

| |Statement 2: COM components are very easy to deploy. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|137. |Which of the following are the binding techniques used by the .NET clients to determine the memory addresses of |[2.0] |

| |the methods and properties of COM objects. | |

| |

| |a) |Early |c) |No | |

| |

| |b) |Late |d) |All of the above. | |

| |

|138. |Statement 1: Once a COM dll is located through the references dialog box and added to the list of COM references, |[2.0] |

| |the COM component can be used in the .NET code. | |

| |Statement 2: creates a namespace bearing the same name as the original COM component but the classes | |

| |provided by that COM component are not placed within that namespace. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|139. |Which of the following is/are true regarding the options of type library importer provided by .NET SDK? | |

| |

| |a) |The option /verbose displays command syntax and |c) |The option /silent suppresses the display of |[2.0] |

| | |options for the tool. | |successful messages. | |

| |

| |b) |The option /? displays additional information about| | | |

| | |the imported type library. | | | |

| |

|140. |Statement 1: creates a wrapper not only for every COM DLL that is imported but also for every COM DLL that |[2.0] |

| |the imported COM DLL references in its public interface. | |

| |Statement 2: creates a wrapper only for COM DLL that is imported but not for every COM DLL that the | |

| |imported COM DLL references in its public interface. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|141. |Statement 1: The NET assemblies require less runtime support than COM components. |[2.0] |

| |Statement 2: The NET assemblies require more runtime support than COM components. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false. | |

|142. |Statement 1: A single .NET client can simultaneously reference component projects in several different .NET |[2.0] |

| |languages. | |

| |Statement 2: A single .NET client can simultaneously reference component projects only in same .NET language. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false. | |

| |

|143. |Which of the following is/are true? |[2.5] |

| |

| |a) |The utility RegAsm can register a .NET component |c) |The utility TlbExp can be used to export a COM | |

| | |with COM services. | |type library for the client and reference it | |

| | | | |from the non-.NET languages. | |

| |

| |b) |The utility TlbExp can be used to interrogate an |d) |All of the above are true. | |

| | |assembly’s manifest. | | | |

| |

|144. |Which of the following is/are true when a reference is added to the COM DLL using references dialog in ? |[2.5] |

| |

| |a) |A .NET proxy component is generated for it and its |c) |The .NET client only talks to the proxy and | |

| | |copy is placed in the .NET projects directory. | |receives data the proxy relays back from the COM| |

| | | | |DLL. | |

| |

| |b) |The .NET proxy component generated describes the |d) |All of the above. | |

| | |COM DLL and serves as a delegate for it to forward | | | |

| | |the calls from the .NET client through COM services| | | |

| | |to the COM DLL that it wraps. | | | |

| |

|145. |Which of the following is/are true regarding COM? |[2.5] |

| |

| |a) |COM components do not provide cross-language |d) |COM compliant languages have facilities for | |

| | |communication. | |getting the value of a COM component’s GUID. | |

| |

| |b) |COM components can provide the count of number of |e) |All of the above. | |

| | |clients that are referencing it. | | | |

| |

| |c) |COM class can make use of prewritten functionality | | | |

| | |for security object pooling and resource | | | |

| | |conservation. | | | |

| |

|146. |Which of the following is/are true? |[2.5] |

| |

| |a) |The .NET component file encapsulates its own |c) |Deploying .NET components is as easy as just | |

| | |description in an internal segment known as the | |copying it into the folder of the executable | |

| | |manifest. | |that references it. | |

| |

| |b) |Different versions of the same .NET component can |d) |All of the above. | |

| | |exist side by side on the same machine and it can | | | |

| | |be in the same folder. | | | |

| |

|147. |Statement 1: When the TlbImp program is executed against a COM DLL, it interrogates the COM DLL’s type library and|[2.5] |

| |translates the information therein into a .NET format, converting COM standard data types into those recognized by| |

| |.NET. | |

| |Statement 2: When the utility TlbImp.exe is run against a COM DLL, its output file (the RCW) is placed into the | |

| |folder of the client executable that will use it. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|148. |Which of the following is/are the drawback(s) of static linking of library files? |[2.5] |

| |Statement 1: Wastage of storage space by placing redundant copies of identical functions in multiple executables. | |

| |Statement 2: A bug existing in one of the utility functions causes a need to recompile and redistribute every | |

| |executable that called that function. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|149. |Which of the following is/are true? |[2.5] |

| |

| |a) |Late binding is slow as compared to early binding. |d) |Late binding in C# can be achieved through | |

| | | | |reflection. | |

| |

| |b) |Writing a late bound code can be difficult and time|e) |All of the above. | |

| | |consuming. | | | |

| |

| |c) |In C# programming, when late binding to a COM | | | |

| | |component, there is no need to create an RCW. | | | |

| |

|150. |Which of the following is/are the advantage(s) of DLL? |[2.5] |

| |

| |a) |Function libraries were compiled into standalone |d) |Dlls are language specific. | |

| | |binary files to be linked dynamically to form | | | |

| | |separate executable files. | | | |

| |

| |b) |Several executable programs could share the same |e) |All of the above. | |

| | |library (.DLL) file. | | | |

| |

| |c) |Fixing a utility function does not need recompiling| | | |

| | |or redistributing all the executables that | | | |

| | |referenced it. | | | |

| |

|151. |The web server, Internet Information Server comes along with Windows NT. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|152. |The _________ kernel is required to execute windows services. |[0.5] |

| |

| |a) |Windows 95 |b) |Windows NT | |

| |

|153. |Service _________ Manager is used to register windows services with the operating system. |[0.5] |

| |

| |a) |Control |b) |Resource | |

| |

|154. |C# understands and interprets ANSI escape sequences denoted by a slash ‘\’ symbol. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|155. |The .exe file of windows service is registered in the windows registry with a utility known as __________. |[0.5] |

| |

| |a) |instutil.exe. |b) |installutil.exe. | |

| |

|156. |The _________ method is an overridden method of the Component class. |[0.5] |

| |

| |a) |Dispose() |b) |Throw() | |

| |

|157. |The _____________ class belongs to the System.IO namespace. |[0.5] |

| |

| |a) |FileSysWatch |b) |FileSystemWatcher | |

| |

|158. |Every method assigned to a delegate must have the same signature as the delegate. |[0.5] |

| |

| |a) |True |c) |False | |

| |

|159. |The __________ class is present in the namespace System.ServiceProcess. |[0.5] |

| |

| |a) |ServiceBase |b) |ServeBase | |

| |

|160. |The ______ method clears all buffers for the current writer after writing any buffered data to the underlying |[0.5] |

| |stream. | |

| |

| |a) |Flush() |b) |Seek() | |

| |

|161. |The StreamWriter class is used for writing characters to a ________. |[0.5] |

| |

| |a) |file |b) |console | |

| |

|162. |Which of the following is/are true regarding windows service? |[1.0] |

| |

| |a) |Their applications run only on Windows NT. |c) |They cannot execute on systems running Windows | |

| | | | |ME/98. | |

| |

| |b) |Their applications can run on Windows 98. |d) |They cannot execute on systems running Windows | |

| | | | |95. | |

| |

|163. |Which of the following methods are used to free resources held by the windows service? |[1.0] |

| |

| |a) |Throw() |c) |Dispose() | |

| |

| |b) |Thrown() |d) |Disposible() | |

| |

|164. |Which of the following is/are true regarding the utility installutil? |[1.0] |

| |

| |a) |It cannot be used to install windows service. |c) |Its parameter /u is used to uninstall the windows| |

| | | | |service. | |

| |

| |b) |It can be used to register windows service. |d) |Its parameter /un is used to uninstall the | |

| | | | |windows service. | |

| |

|165. |Statement 1: A Service Program is where the functionality of the windows service is written. |[1.0] |

| |Statement 2: The algorithm of the windows service resides in Service Configuration Program. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|166. |Which of the following is/are true regarding windows services? |[1.0] |

| |

| |a) |They are not started like traditional applications.|c) |They can be started only at boot up time. | |

| |

| |b) |They are started like traditional applications. |d) |They are always started using a service control | |

| | | | |program | |

| |

|167. |Which of the following is/are true? |[1.0] |

| |

| |a) |The Dispose() method does not free resources that |c) |The InitializeComponent() method can contain code| |

| | |the windows service holds. | |to set the windows service name property. | |

| |

| |b) |The InitializeComponent() method initializes the |d) |The Dispose() method initializes the windows | |

| | |windows service by itself. | |service by itself. | |

| |

|168. |Statement 1: Service Configuration Program does the registration of windows service in the registry. |[1.0] |

| |Statement 2: Copying the required files to the system would register the windows service in the registry. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false. | |

| |

|169. |Statement 1: It is not necessary for windows services to be registered with Service Control Manager. |[1.0] |

| |Statement 2: The service control manager communicates with the windows service by sending requests that start, | |

| |stop or pause a service. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2ac is false | |

| |

|170. |Statement 1: An exe of windows service needs to be installed on the machine that needs to run it. |[1.0] |

| |Statement 2: It is not necessary for an exe of windows service to be installed on the machine that needs to run | |

| |it. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|171. |Consider the snippet below: |[1.5] |

| | | |

| |sout.BaseStream.Seek(0, SeekOrigin.End) | |

| | | |

| |Which of the following statements is/are true? | |

| |Statement 1: The BaseStream property gets the underlying stream associated with sout. | |

| |Statement 2: The value, SeekOrigin.End is used to move the pointer to the end of the file, which can inturn be | |

| |used to add content to the end of the file. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|172. |Which of the following is/are true? |[1.0] |

| |

| |a) |The current working directory of the windows |c) |Once the service is loaded into memory using the | |

| | |service is the system directory or the directory in| |OnStart() method, it can be started by invoking | |

| | |which the executable is located. | |the method Run(). | |

| |

| |b) |Once the service is loaded into memory using the |d) |The functionality of the windows service is coded| |

| | |Run() method, it can be started by invoking the | |in the OnStart() method. | |

| | |method OnStart(). | | | |

| |

|173. |Which of the following is/are true? |[1.5] |

| |

| |a) |The service program has the actual logic of the |c) |A single service program cannot contain code for| |

| | |windows service present with it. | |a number of windows services. | |

| |

| |b) |It is necessary that only one windows service |d) |Each of the windows services should have the | |

| | |should reside in a service program. | |service Main method. | |

| |

|174. |Which of the following is/are true? |[1.5] |

| |

| |a) |Visual auto-generates skeleton code for |d) |If the service program requires more than a | |

| | |windows service. | |single service in the same service application, | |

| | | | |more than one single service main methods must | |

| | | | |be created and registered with the service | |

| | | | |control manager. | |

| |

| |b) |The service class of the service program contains |e) |All of the above. | |

| | |the overridden OnStart() and OnStop() of the | | | |

| | |ServiceBase class. | | | |

| |

| |c) |The Service Control Manager invokes the OnStart() | | | |

| | |and OnStop() methods when the service is started | | | |

| | |and stopped respectively. | | | |

| |

|175. |Statement 1: To implement a service controller program, the ServiceController class of the System.ServiceProcess |[1.5] |

| |namespace must be inherited. | |

| |Statement 2: To implement a service program, the ServiceBase class of the System.ServiceProcess namespace must be | |

| |inherited. | |

| |Statement 3: To implement a service configuration program, the classes ServiceProcessInstaller and | |

| |ServiceInstaller must be inherited. | |

| |

| |a) |Only statements 1 and 2 are true. |d) |Statements 1, 2, 3 are true. | |

| |

| |b) |Only statements 1 and 3 are true. |e) |None of the above is true. | |

| |

| |c) |Only statements 2 and 3 are true. | | | |

| |

|176. |Which of the following is/are true regarding service control program? |[1.5] |

| |

| |a) |It can be optionally created for a windows service.|d) |Control operations on a windows service can be | |

| | | | |performed through the Windows 2000 Services MMC.| |

| |

| |b) |It can be used to control a windows service. |e) |All of the above. | |

| |

| |c) |It allows a windows service to be started / stopped| | | |

| | |/ paused or to perform a custom operation. | | | |

| |

|177. |Which of the following is/are true regarding the Run() method of ServiceBase class? |[1.5] |

| |

| |a) |Being a static method, it can be invoked without |d) |It cannot be invoked without instantiating the | |

| | |instantiating the object of the class. | |object of the class. | |

| |

| |b) |It is an overloaded method and provides the main |e) |All of the above. | |

| | |entry point for a service executable. | | | |

| |

| |c) |It loads the specified services into memory so that| | | |

| | |they can be started. | | | |

| |

|178. |Consider the snippet given below: |[1.5] |

| | | |

| |FileStream fout = new FileStream(@"c:\LogFile.Txt", | |

| |FileMode.OpenOrCreate, FileAccess.Write); | |

| |StreamWriter sout = new StreamWriter(fout); | |

| | | |

| |Which of the following is/are true of the FileStream class? | |

| |

| |a) |The first parameter of the constructor of the |d) |The third parameter of the constructor of the | |

| | |FileStream class is a string that specifies the | |class FileStream has an enumeration that | |

| | |filename to which the output should be written. | |controls the kind of access users have to a | |

| | | | |file. | |

| |

| |b) |The OpenOrCreate enumeration opens the specified |e) |All of the above. | |

| | |file if it exists. | | | |

| |

| |c) |The OpenOrCreate enumeration does not create a new | | | |

| | |file if it does not exist. | | | |

| |

|179. |Which of the following is/are true? |[1.5] |

| |

| |a) |Visual generates the service installer |d) |Visual generates the service | |

| | |class ProjectInstaller.cs file. | |installer class ProjectInstall.cs file. | |

| |

| |b) |Setting the Start Type property of the object of |e) |The Start Type property has its default value as| |

| | |class ServiceInstaller to Automatic starts the | |Automatic. | |

| | |service at boot-up automatically. | | | |

| |

| |c) |Setting the Start Type property of the object of | | | |

| | |class ServiceInstaller to Manual requires the | | | |

| | |service to be started manually. | | | |

| |

|180. |Which of the following is/are true? |[1.5] |

| |

| |a) |The Account property of the serviceProcessInstaller |d) |A transaction based install allows the installer| |

| | |object is set to LocalSystem for the service to be | |to completely roll-back incase it fails at any | |

| | |handled not only by the system itself but also by | |point of time. | |

| | |the logged on user. | | | |

| |

| |b) |ProjectInstaller class is derived from the class |e) |The attribute RunInstaller enables the | |

| | |System.Configuration.Installer. | |ProjectInstaller class to be invoked when | |

| | | | |installing an assembly. | |

| |

| |c) |Using the Installer class, transaction-based | | | |

| | |installations can be created. | | | |

| |

|181. |Statement 1: To get the filename, the FullPath() method of the FileSystemEventArgs class is used. |[1.5] |

| |Statement 2: OnStart() and OnStop() are overridden methods. | |

| |Statement 3: OnStart() and OnStop() are the methods called when a service starts. | |

| |

| |a) |Only statements 1 and 2 are true. |d) |Statements 1, 2, 3 are true | |

| |

| |b) |Only statements 1 and 3 are true. |e) |None of the above is true. | |

| |

| |c) |Only statements 2 and 3 are true. | | | |

| |

|182. |Which of the following is/are true regarding FileSystemWatcher class? |[1.5] |

| |

| |a) |It listens to the file system change notifications |d) |For watching files of a particular extension, | |

| | |and raises events when a file in a directory | |the Filter property needs to be set to an empty | |

| | |changes. | |string. | |

| |

| |b) |BeginInit() method is used to specify that the |e) |For watching all files in a directory, | |

| | |initialization of the object is to begin. | |regardless of whether they have an extension or | |

| | | | |not, the Filter property is set to “*.*”. | |

| |

| |c) |The Filter property is used to set the type of | | | |

| | |files to monitor. | | | |

| |

|183. |Which of the following is/are true regarding FileSystemWatcher class? |[1.5] |

| |

| |a) |Setting the EnableRaisingEvents property to true |d) |It consists of Created and Deleted events. | |

| | |will cause its object to raise events. | | | |

| |

| |b) |The Path property is used to specify the path to be|e) |All of the above. | |

| | |monitored by its object. | | | |

| |

| |c) |The default value for Path property is an empty | | | |

| | |string. | | | |

| |

|184. |Which of the following classes is inherited by the classes ServiceProcessInstaller and ServiceInstaller |[2.0] |

| |

| |a) |ComponentInstall. |c) |ContainerInstall. | |

| |

| |b) |ContainerInstaller. |d) |ComponentInstaller. | |

| |

|185. |Which of the following is the method of the class System.ServiceProcess.NativeMethods |[2.0] |

| |

| |a) |StartCtrlDispatcher() |c) |StartServiceCtrlDispatcher() | |

| |

| |b) |StartServiceControlDispatcher() |d) |StartControlDispatcher() | |

| |

|186. |Which of the following is/are true? |[2.0] |

| |

| |a) |The method ServiceMainCallback() belongs|c) |The method ServiceMainCallback() belongs to the class ServiceBase | |

| | |to the class ServiceInstaller class. | |class. | |

| |

| |b) |The service class derived from |d) |The service class derived from ServiceBase class communicates with SCM| |

| | |ServiceBase class communicates with SCM | |using a helper class System.ServiceProcess.NativeMethods. | |

| | |using a helper class | | | |

| | |System.NativeMethods. | | | |

| |

|187. |Which of the following is/are the method(s) of the class Installer? |[2.0] |

| |

| |a) |Install() |d) |Uninstall() | |

| |

| |b) |Commit() |e) |All of the above. | |

| |

| |c) |RollBack() | | | |

| |

|188. |Which of the following are the properties of ServiceInstaller? |[2.0] |

| |

| |a) |StartType |d) |ServicesDependentOn | |

| |

| |b) |Display |e) |All of the above. | |

| |

| |c) |WindowsServiceName | | | |

| |

|189. |Which of the following are the parts of a service program? |[2.0] |

| |

| |a) |Main function that acts as an entry point of the |c) |The handler. | |

| | |program. | | | |

| |

| |b) |The service–main function. |d) |All of the above. | |

| |

|190. |Which of the following is/are true with regards to service main function of service program? |[2.0] |

| |

| |a) |It contains functionality of the service, which is |c) |All of the above. | |

| | |called by the SCM when the service should start. | | | |

| |

| |b) |This function need not register a handler function | | | |

| | |in the SCM. | | | |

| |

|191. |Which of the following handler methods in a service class can be overridden? |[2.0] |

| |

| |a) |OnStop() |c) |OnShutdown() | |

| |

| |b) |OnPauseAndContinue() |d) |All of the above. | |

| |

|192. |Which of the following is/are true regarding the handler methods used for windows services? |[2.5] |

| |

| |a) |To invoke the methods OnPause() and OnContinue(), |c) |To invoke the methods OnPause() and | |

| | |the property CanPauseAndContinue must be set to | |OnContinue(), the property PauseAndContinue must| |

| | |true. | |be set to true. | |

| |

| |b) |To invoke the method OnShutdown(), the property |d) |To invoke the method OnShutdown(), the property | |

| | |CanShutdown must be set to true. | |Shutdown must be set to true. | |

| |

|193. |Which of the following is used to indicate that the class ExampleInstaller should be invoked when installing an |[2.5] |

| |assembly? | |

| |

| |a) |[RunInstaller(false)] |c) |[RunInstaller(true)] | |

| | |public class ExampleInstaller: | |public class ExampleInstaller: | |

| | |System.Configuration.In | |System.Install.Installer { | |

| | |stall.Installer { | |… | |

| | |… | |} | |

| | |} | | | |

| |

| |b) |[RunInstaller(true)] |d) |[RunInstaller(true)] | |

| | |public class ExampleInstaller: | |public class ExampleInstaller: | |

| | |System.Configuration.In | |System.Configuration.In | |

| | |staller { | |stall.Installer { | |

| | |… | |… | |

| | |} | |} | |

| |

|194. |Statement 1: The default service name for a windows service in .NET is WindowsService1. |[2.5] |

| |Statement 2: AutoLog property of a service is configured for events to be automatically logged for starting and | |

| |stopping the service. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|195. |Which of the following is/are true? |[2.5] |

| |

| |a) |To implement a service, the ServiceBase class is |d) |To install and configure service programs, the | |

| | |inherited. | |classes ServiceProcessInstaller and | |

| | | | |ServiceInstaller are used. | |

| |

| |b) |The ServiceController class is used to register the|e) |All of the above. | |

| | |services. | | | |

| |

| |c) |The class ServiceBase is used to implement a | | | |

| | |service control program. | | | |

|196. |Which of the following is/are true? |[2.5] |

| |

| |a) |A service control manager is a part of the |d) |A windows service cannot depend on another | |

| | |operating system that communicates with the windows| |windows service. | |

| | |service. | | | |

| |

| |b) |A service control program can be used to stop, |e) |All of the above. | |

| | |suspend and resume a windows service. | | | |

| |

| |c) |Windows services need not be configured in the | | | |

| | |registry. | | | |

| |

|197. |Which of the following are the examples of windows services? |[2.5] |

| |

| |a) |TCP/IP Services |d) |Microsoft Search | |

| |

| |b) |World Wide Publishing Service |e) |All of the above. | |

| |

| |c) |Event Log | | | |

| |

|198. |Statement 1: A service program implements the functionality of the windows service. |[2.5] |

| |Statement 2: A service program can provide more than one windows service in a single program. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|199. |Statement 1: Windows services are applications that can be automatically started when the Operating system boots. |[2.5] |

| |Statement 2: Windows services, when run, always need an interactive user logged on to the system. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|200. |Current state of a windows service can be known programmatically. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|201. |The .Net SDK provides the ______________ class to determine the state of any windows service. |[0.5] |

| |

| |a) |ServeControl |b) |ServiceController | |

| |

|202. |The _________ method retrieves all the services registered on the local system. |[0.5] |

| |

| |a) |ObtainServices() |b) |GetServices() | |

| |

|203. |The display name of a windows service is fetched using the _________property. |[0.5] |

| |

| |a) |DisplayName |b) |Name | |

| |

|204. |The current status of the windows service is obtained using the _______ property. |[0.5] |

| |

| |a) |GetStatus |b) |Status | |

| |

|205. |The Status property holds an enumerator of the enumeration ServiceControllerStatus. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|206. |Windows services have user interfaces. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|207. |By default, all windows services write to the system log every time they start and stop. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|208. |Windows services can be made to write to any of the event logs. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|209. |Before rebuilding any windows service application, it is to be ensured that windows service is not running. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|210. |The EventLog class resides in the ___________ namespace. |[0.5] |

| |

| |a) |System.EventDiagnostics |b) |System.Diagnostics | |

| |

|211. |The Log property of the EventLog class sets the event log to which windows service writes. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|212. |Statement 1: The .Net SDK provides the ServiceController class to determine the state of any windows service. |[1.0] |

| |Statement 2: The ServiceController class can give information such as display name about the service. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|213. |Which of the following is/are true regarding the ServiceController class? |[1.0] |

| |

| |a) |The GetServices() method of the ServiceController |c) |The GetServices() method of the | |

| | |class is a static method. | |ServiceController class is not a static method. | |

| |

| |b) |The GetServices() method retrieves all the services|d) |The GetServices() method retrieves all the | |

| | |registered on the local system. | |services running on the local system. | |

| |

|214. |Statement 1: The GetServices() method returns only one object of the class ServiceController for all services |[1.0] |

| |registered on the system. | |

| |Statement 2: The GetServices() method returns an array of the ServiceController class where each array element | |

| |refers to each of the services registered on the system. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|215. |The Status property of ServiceController class holds an enumerator of the ServiceControllerStatus enumeration that|[1.0] |

| |has ________ options. | |

| |

| |a) |Five |c) |Three | |

| |

| |b) |Two |d) |Seven | |

| |

|216. |Which of the following would best describe the Running enumerator of the ServiceControllerStatus enumeration? |[1.0] |

| |

| |a) |The Windows service is Running. |c) |The Windows service has been Paused. | |

| |

| |b) |The Windows service is Not Running. |d) |None of the above. | |

| |

|217. |Which of the following would best describe the Stopped enumerator of the ServiceControllerStatus enumeration? |[1.0] |

| |

| |a) |The Windows service is Running. |c) |The Windows service has been Paused. | |

| |

| |b) |The Windows service is Not Running. |d) |None of the above. | |

| |

|218. |Statement 1: The Source property can contain the text that appears in the source category of the Application log. |[1.0] |

| |Statement 2: The Log property can contain the text that appears in the source category of the Application log. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|219. |Statement 1: The EventLog class resides in the namespace System.Diagnostics. |[1.0] |

| |Statement 2: The Log property is used to get or set the Windows event log to which the windows service writes. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|220. |Which of the following would describe the Paused enumeration member of the ServiceControllerStatus enumeration? |[1.0] |

| |

| |a) |The Windows service is Running. |c) |The Windows service has been Paused. | |

| |

| |b) |The Windows service is Not Running. |d) |None of the above. | |

| |

|221. |Statement 1: The EventLog class of the System.Diagnostics namespace provides interaction with the Windows event |[1.0] |

| |logs. | |

| |Statement 2: The Log property is used to get or set the name of the windows event log to read or write. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|222. |Statement 1: Setting Log property of an object of the EventLog class to Application allows windows service to |[1.0] |

| |write to the Application event log. | |

| |Statement 2: Setting Log property of an object of the EventLog class to ApplicationEvent allows windows service to| |

| |write to the Application event log. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|223. |Which of the following is/are true regarding the WriteEntry() method of EventLog class? |[1.0] |

| |

| |a) |It is an overloaded method. |c) |It writes the string as the Log entry. | |

| |

| |b) |It takes in one string parameter only. |d) |It returns void. | |

| |

|224. |Which of the following statements is/are true regarding the ServiceController class methods? |[1.5] |

| |Statement 1: By calling the Pause() method, a windows service can be made to temporarily stop execution. | |

| |Statement 2: By calling the Continue() method, a paused windows service can be made to resume execution. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|225. |Which of the following is/are true? |[1.5] |

| |

| |a) |To report any errors, windows services utilize the |d) |Windows 2000 maintains three different types of | |

| | |event logging architecture of Windows although they| |logs- the Application log, the Security log and | |

| | |do not lack a user interface. | |the SystemEvent log. | |

| |

| |b) |A windows service can be made to write an error |e) |Windows services can write to any of the event | |

| | |message to a log file when it encounters a problem.| |logs viewed from the Event viewer. | |

| |

| |c) |By default, all windows services write to the | | | |

| | |system log every time they start and stop. | | | |

| |

|226. |Which of the following code snippets will enable the windows service to write a custom log event to the |[1.5] |

| |Application log of Windows along with logging the filename? | |

| |

| |a) | ... |c) | ... | |

| | |EventLog evt = new EventLog(); | |EventLog evt = new EventLog(); | |

| | |evt.Log = "App"; | |evt.LogProperty = "Application"; | |

| | |evt.Source="Windows Service"; | |evt.Source="Windows Service"; | |

| | |evt.WriteEntry(”Operation Complete!”); | |evt.WriteEntry(”Operation Complete!”); | |

| | |... | |... | |

| |

| |b) |... |d) | ... | |

| | |EventLog evt = new EventLog(); | |EventLog evt = new EventLog(); | |

| | |evt.Log = "Application"; | |evt.Log = "Application"; | |

| | |evt.Source="Windows Service"; | |evt.Source="Windows Service"; | |

| | |evt.WriteEntry(”Operation Complete!”); | |evt.Write(”Operation Complete!”); | |

| | |... | |... | |

| |

|227. |Which of the following would best describe the StartPending enumerator of the ServiceControllerStatus enumeration?|[1.5] |

| |

| |a) |The Windows service is Running. |d) |The Windows service is Stopping. | |

| |

| |b) |The Windows service is Starting. |e) |The Windows service is starting after a pause. | |

| |

| |c) |The Windows service is Pausing. | | | |

| |

|228. |Which of the following would best describe the ContinuePending enumerator of the ServiceControllerStatus |[1.5] |

| |enumeration? | |

| |

| |a) |The Windows service is Running. |d) |The Windows service is Stopping. | |

| |

| |b) |The Windows service is Starting. |e) |The Windows service is starting after a pause. | |

| |

| |c) |The Windows service is Pausing. | | | |

| |

|229. |Which of the following would best describe the StopPending enumerator of the ServiceControllerStatus enumeration? |[1.5] |

| |

| |a) |The Windows service is Not Running. |d) |The Windows service is Stopping. | |

| |

| |b) |The Windows service has been Paused. |e) |The Windows service is starting after a pause. | |

| |

| |c) |The Windows service is Pausing. | | | |

| |

|230. |Which of the following would best describe the PausePending enumerator of the ServiceControllerStatus enumeration?|[1.5] |

| |

| |a) |The Windows service is Not Running |d) |The Windows service is Stopping | |

| |

| |b) |The Windows service has been Paused |e) |The Windows service is starting after a pause | |

| |

| |c) |The Windows service is Pausing | | | |

| |

|231. |Which of the following statements is/are true regarding the ServiceController class methods? |[1.5] |

| |Statement 1: By calling the method Stop(), the windows service is stopped but the program does not exit. | |

| |Statement 2: By calling the method Start(),the windows service starts if it is not running initially. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false | |

| |

|232. |Consider the snippet given below: |[1.5] |

| | | |

| |... | |

| |ServiceController[] sers = | |

| |ServiceController.GetServices(); | |

| |foreach(ServiceController s in sers) | |

| |{ | |

| |Console.WriteLine("\nService Name : | |

| |{0}",s.DisplayName); | |

| |Console.WriteLine("ServiceStatus : | |

| |{0}",s.Status); | |

| |} | |

| |Which of the following is/are true? | |

| |

| |a) |The code above will generate an error. |d) |The status of each service in sers object is | |

| | | | |displayed on the console.. | |

| |

| |b) |The array object sers contains all the services |e) |The array object sers contains all the services | |

| | |registered on the local system. | |registered on the remote system. | |

| |

| |c) |The display name for each service in sers object is| | | |

| | |displayed on the console. | | | |

| |

|233. |Consider a windows service named “FirstWinService”. Its status is to be checked to see if it is running; if it is then it |[1.5] |

| |displays the message “The service FirstWinService is running” else it starts the service. | |

| | | |

| |Which of the following is/are true? | |

| |

| |a) |if(s.DisplayName== |c) |if(s.DisplayName== | |

| | |“FirstWinService”) { | |“FirstWinService”){ | |

| | |Console.WriteLine("The service {0} is | |if(s.Status == | |

| | |running",s.DisplayName); | |System.ServiceProcess. | |

| | |}else{ | |ServiceControllerStatus. | |

| | |s.Start(); | |Running){ | |

| | |} | |Console.WriteLine("The service {0} is | |

| | | | |running",s.DisplayName); | |

| | | | |} | |

| | | | |} | |

| |

| |b) |if(s.DisplayName== |d) |if(s.DisplayName== | |

| | |“FirstWinService”){ | |“FirstWinService”) | |

| | |if(s.Status == | |{ | |

| | |System.ServiceProcess. | |if(s.Status == | |

| | |ServiceControllerStatus. | |System.ServiceProcess. | |

| | |Stopped) { | |ServiceControllerStatus. | |

| | |Console.WriteLine("The service {0} is | |Running) | |

| | |running",s.DisplayName); | |{ | |

| | |} | |Console.WriteLine("The service {0} is | |

| | |else{ | |running",s.DisplayName); | |

| | |s.Start(); | |} | |

| | |} | |Else | |

| | |} | |{ | |

| | | | |s.Start(); | |

| | | | |} | |

| | | | |} | |

| |

|234. |Which of the following is/are the method(s) used for event logging process? |[2.0] |

| |

| |a) |WriteEvents() |c) |WriteEvent() | |

| |

| |b) |WriteEntries() |d) |WriteEntry() | |

| |

|235. |Which of the following is/are the method(s) of ServiceController class? |[2.0] |

| |

| |a) |Start() |d) |ExecuteStatement() | |

| |

| |b) |Continue() |e) |Pause() | |

| |

| |c) |Stopping() | | | |

| |

|236. |Which of the following is/are the class(es) used for event logging in the System.Diagnostics namespace? |[2.0] |

| |

| |a) |EventLog |d) |EventLogInstall | |

| |

| |b) |EventLogEntry |e) |EventLogTraceListener | |

| |

| |c) |EventLogEntriesCollected | | | |

| |

|237. |Which of the following is/are true regarding the properties of the ServiceController class? |[2.0] |

| |

| |a) |The property DependentServices returns a collection|c) |The property ServiceType indicates whether only | |

| | |of dependent services. | |one or more than one service can run within the | |

| | | | |same process. | |

| |

| |b) |The property ServicesDependentOn returns a |d) |All of the above. | |

| | |collection of the services that the service depends| | | |

| | |on. | | | |

| |

|238. |Statement 1: GetServices() method can only be invoked by instantiating an object for the class ServiceController |[2.5] |

| |to return an array of ServiceController class objects that represent all windows services. | |

| |Statement 2: GetServices() is a static method of the ServiceController class and it returns a ServiceController | |

| |array representing all windows services registered on the local system. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|239. |Statement 1: The ServiceController class has a static method GetDevices() that returns a ServiceController array |[2.5] |

| |representing all device driver services on a computer. | |

| |Statement 2: The ServiceController class has a static method GetDrivers() that returns a ServiceController array | |

| |representing all device driver services on a computer. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|240. |Which of the following is/are true? |[2.5] |

| |

| |a) |A service class derived from ServiceBase |c) |A service class derived from ServiceBase logs | |

| | |automatically logs Start & Stop events when the | |events irrespective of the AutoLog property | |

| | |AutoLog property is set to true. | |being true or false. | |

| |

| |b) |The ServiceBase class checks the AutoLog property |d) |The ServiceBase class checks the AutoLog | |

| | |and writes a log entry at start, stop, pause and | |property and writes log entries only at start | |

| | |continue requests. | |and stop requests. | |

| |

|241. |Which of the following is/are true regarding the event log files? |[2.5] |

| |

| |a) |Applications and services write to application log |d) |Security Log file is used by the operating | |

| | |files. | |system for auditing purpose. | |

| |

| |b) |System Log file is used for the system and device |e) |All of the above. | |

| | |drivers. | | | |

| |

| |c) |Security Log file is read only for applications. | | | |

| |

|242. |The XmlWriter class is an abstract class required to write XML data to streams. |0.5 |

| |

| |a) |True |b) |False | |

| |

|243. |The _________ class gives a tree representation of an XML document, which enables its navigation and editing. |[0.5] |

| |

| |a) |XmlTemplate |b) |XmlDocument | |

|244. |The XmlTextReader is derived from the class _____________. |[0.5] |

| |

| |a) |XmlReader |b) |XmlReadCharStream | |

| |

|245. |The _______ value for ValidationType property is to validate the document according to DTD rules. |[0.5] |

| |

| |a) |XDR |b) |DTD | |

| |

|246. |The WriteStartDocument() method writes the XML declaration with the version "1.0". |[0.5] |

| |

| |a) |True |b) |False | |

| |

|247. |The stream created by XmlWriter can be closed using the Close() method of the object. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|248. |The method _________ of the XmlTextWriter class is used to write the string data within an element to the XML |[0.5] |

| |file. | |

| |

| |a) |WriteString() |b) |WriteStartElement() | |

| |

|249. | uses _______ to transport data from the data store to the web pages. |[0.5] |

| |

| |a) |HTML |b) |XML | |

| |

|250. |The contents of the dataset are written to an XML file using the _________ method of the dataset object. |[0.5] |

| |

| |a) |WriteXml() |b) |Write() | |

| |

|251. |The XmlValidatingReader class implements the _________ class. |[0.5] |

| |

| |a) |XmlCharReader |b) |XmlReader | |

| |

|252. |The class XmlNodeList does not represent an ordered collection of nodes within the XML document. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|253. |Which of the following are the classes of the System.Xml namespace? |[1.0] |

| |

| |a) |XmlReader |c) |XmlCharReader | |

| |

| |b) |XmlWriter |d) |XmlCharWriter | |

| |

|254. |XML written using the XmlTextWriter class conforms to the W3C Extensible Markup Language 1.0 specification but not|[1.0] |

| |to the Namespaces in XML specification. | |

| |

| |a) |True |b) |False | |

| |

|255. |Statement 1: The Flush() method flushes the buffer and writes whatever data is left in the buffer to the stream. |[1.0] |

| |Statement 2: The Flush() method flushes the buffer but does not write data left in the buffer to the stream. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|256. |Statement 1: The XmlValidatingReader class cannot take the class XmlTextReader as an input. |[1.0] |

| |Statement 2: Being an implementation of the XmlReader class, the XmlValidatingReader class can take the class | |

| |XmlTextReader as an input. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|257. |Which of the following statements are true for DTDs and Schemas? |[1.0] |

| |

| |a) |DTDs can be used to define document structure, data|c) |Schemas can be used to define document | |

| | |types, and content constraints. | |structure, data types, and content constraints. | |

| |

| |b) |Schemas cannot be used to define document |d) |DTDs cannot be used to define document | |

| | |structure, data types, and content constraints. | |structure, data types, and content constraints. | |

| |

|258. |The GetElementsByTagName() method of the XmlDocument class returns the ________ object containing a list of all |[1.0] |

| |descendant elements that match the specified name. | |

| |

| |a) |XmlNodeAllList |c) |XmlNodeListElement | |

| |

| |b) |XmlNodeListAll |d) |XmlNodeList | |

| |

|259. |Which of the following method exists in the XmlDocument class to return list of all descendant elements? |[1.0] |

| |

| |a) |GetElementsTagName() |c) |GetElementsByTagName() | |

| |

| |b) |GetElementsbyname() |d) |GetElementsByTag() | |

| |

|260. |The ___________ method of the XmlDocument class is used to create a new element in the XML file. |[1.0] |

| |

| |a) |CreateNewElement() |c) |CreateElements() | |

| |

| |b) |Create() |d) |CreateElement() | |

| |

|261. |Which of the following properties does the class XmlValidatingReader include? |[1.0] |

| |

| |a) |ValidationType |c) |Schema Type | |

| |

| |b) |Schemas |d) |All of the above | |

|262. |Which of the following statements are true? |[1.0] |

| |

| |a) |When the XML document needs to be indented, |c) |When the XML document needs to be indented, | |

| | |Formatting.Indented enumeration is specified. | |Formatting.Indent enumeration is specified. | |

| |

| |b) |When the XML document does not require being |d) |When the XML document does not require being | |

| | |indented, Formatting.No enumeration is specified. | |indented, Formatting.None enumeration is | |

| | | | |specified. | |

| |

|263. |Which of the following are valid values for the ValidationType property? |[1.0] |

| |

| |a) |DTD |d) |Auto | |

| |

| |b) |Schema |e) |All of the above | |

| |

| |c) |XRD | | | |

| |

|264. |Consider the snippet given below: |[1.5] |

| | | |

| |string fname = "d:\\employee.xml"; | |

| |XmlTextWriter writer = new XmlTextWriter (fname, null); | |

| |writer.Formatting = Formatting.Indented; | |

| |writer.Indentation= 4; | |

| | | |

| |Which of the following is true? | |

| |

| |a) |An XML file called employee.xml in the root |d) |The number of spaces to be indented in the file | |

| | |directory of drive d is created if it does not | |employee.xml is set to four. | |

| | |exist. | | | |

| |

| |b) |The Formatting property of the writer object is |e) |All of the above | |

| | |used to specify the format for the XML document. | | | |

| |

| |c) |The file employee.xml is indented as the | | | |

| | |Formatting.Indented enumeration is specified. The | | | |

| | |file employee.xml is indented as the | | | |

| | |Formatting.Indented enumeration is specified. | | | |

| |

|265. |Consider the following snippet below: |[1.5] |

| |XmlTextWriter writer = new XmlTextWriter(“d:\\emp.xml”, null); | |

| |Which of the following statements are true? | |

| |

| |a) |The writer object can be used to write data to the |c) |There is only one type of XmlTextWriter | |

| | |XML file emp.xml in d: drive. | |constructor. | |

| |

| |b) |The file emp.xml associated with the writer object |d) |All of the above | |

| | |does not have any encoding style. | | | |

| |

|266. |Consider an element Employee to be created. Within the element Employee there are two more elements, Name and |[1.5] |

| |Salary. The value of the Name and Salary elements should be Martin and 50000 respectively. | |

| |Which of the following will be used to create a structure such as the one mentioned above? | |

| |

| |a) |Writer.WriteStartElement("", "Employee", ""); |c) |Writer.WriteStartElement("", "Employee", ""); | |

| | |Writer.WriteStartElement("", "Name", ""); | |Writer.WriteStartElement("", "Name", ""); | |

| | |Writer.WriteString("Martin"); | |Writer.WriteStartElement("", "Salary", ""); | |

| | |Writer.WriteEndElement(); | |Writer.WriteString("Martin"); | |

| | |Writer.WriteStartElement("", "Salary", ""); | |Writer.WriteString("50000"); | |

| | |Writer.WriteString("50000"); | | | |

| | |Writer.WriteEndElement(); | | | |

| |

| |b) |Writer.WriteStartElement("", "Employee", ""); |d) |Writer.WriteStartElement("", "Employee", ""); | |

| | |Writer.WriteStartElement("", "Name", ""); | |Writer.WriteStartElement("", "Name", ""); | |

| | |Writer.WriteString("Martin"); | |Writer.WriteString("Martin"); | |

| | |Writer.WriteStartElement("", "Salary", ""); | |Writer.WriteEndElement(); | |

| | |Writer.WriteString("50000"); | |Writer.WriteStartElement("", "Salary", ""); | |

| | |Writer.WriteEndElement(); | |Writer.WriteString("50000"); | |

| | | | |Writer.WriteEndElement(); | |

| | | | |Writer.WriteEndElement(); | |

| |

|267. |Which of the following statements are true regarding the XmlReader class? |[1.5] |

| |

| |a) |provides fast access to streams of XML data, but |d) |It is an abstract class and the XmlTextReader | |

| | |access is limited to a backward-only, read-only | |class inherits from it. | |

| | |cursor. | | | |

| |

| |b) |Using it, programs that switch back and forth |e) |All of the above. | |

| | |within an XML file cannot be written but can only | | | |

| | |be read in a forward direction. | | | |

| |

| |c) |It provides a less resource-demanding way to read | | | |

| | |XML files. | | | |

| |

|268. |Which of the following statements are true? |[1.5] |

| |

| |a) |To check if the node read is an element node, the |c) |To check if the node read is an element node, | |

| | |NodeType property of the Reader object and the | |the type of the node is compared with the | |

| | |XmlNodeType enumeration are used. | |enumerator XmlNodeType.IsElement of the | |

| | | | |XmlNodeType enumeration. | |

| |

| |b) |The NodeType property gets the type of the current |d) |To check if the node read is an element node, | |

| | |node. | |the type of the node is compared with the | |

| | | | |enumerator XmlNodeType.Element of the | |

| | | | |XmlNodeType enumeration. | |

|269. |The xml file, doctor.xml, has an element called Name. Which of the following will be used to display the data enclosed|[1.5] |

| |within the Name element on the console? | |

| |

| |a) |XmlTextReader rd = new XmlTextReader |c) |XmlTextReader rd = new XmlTextReader | |

| | |(“d:\\doctor.xml"); | |(“d:\\doctor.xml"); | |

| | |while (rd.Read()){ | |while (rd.Read()){ | |

| | |if (rd.NodeType == XmlNodeType.Element){ | |if (rd.NodeType == XmlNodeType.Elements){ | |

| | |if (rd.LocalName. | |if (rd.LocalName.Equals("Name")){ | |

| | |Equals("Name")){ | |Console.Write("The doctors name is {0} ”, | |

| | |Console.Write("The doctors name is {0} ”, | |rd.ReadString()); | |

| | |rd.ReadString()); | |} | |

| | |} | |} | |

| | |} | |} | |

| | |} | | | |

| |

| |b) |XmlTextReader rd = new XmlTextReader |d) |XmlTextReader rd = new XmlTextReader | |

| | |(“d:\\doctor.xml"); | |(“d:\\doctor.xml"); | |

| | |while (rd.Read()){ | |while (rd.Read()){ | |

| | |if (rd.Node == XmlNodeType.Elements){ | |if (rd.NodeType == XmlNodeType.Element){ | |

| | |if (rd.Name.Equals("Name")){ | |if (rd.Name.Equals("Name")){ | |

| | |Console.Write("The doctors name is {0} ”, | |Console.Write("The doctors name is {0} ”, | |

| | |rd.Read()); | |rd.ReadString()); | |

| | |} | |} | |

| | |} | |} | |

| | |} | |} | |

| |

|270. |Which of the following statements is/are true? |[1.5] |

| |

| |a) |The Document Object Model is used to avoid going |c) |In DOM a particular node is selected by using | |

| | |through an entire XML document for just a little | |the GetElementsByTagName() method of the | |

| | |piece of code. | |XmlDocument class. | |

| |

| |b) |Using the DOM a particular node can be selected. |d) |All of the above. | |

| |

|271. |What happens when the ValidationType property is set to Auto? |[1.5] |

| |

| |a) |The document is validated according to DTD rules. |d) |No Validation is required. | |

| |

| |b) |The document is validated according to the XSD |e) |It detects the type of validation based on the | |

| | |schema. | |declarations found within the document. | |

| |

| |c) |The document is validated according to XDR Schema. | | | |

| |

|272. |What happens when the ValidationType property is set to XDR? |[1.5] |

| |

| |a) |The document is validated according to DTD rules. |c) |No Validation is required. | |

| |

| |b) |The document is validated according to the XSD |d) |It detects the type of validation based on the | |

| | |schema. | |declarations found within the document. | |

| |

| |c) |The document is validated according to XDR Schema. | | | |

| |

|273. |What happens when the ValidationType property is set to Schema? |[1.5] |

| |

| |a) |The document is validated according to DTD rules. |d) |No Validation is required. | |

| |

| |b) |The document is validated according to the XSD |e) |It detects the type of validation based on the | |

| | |schema. | |declarations found within the document. | |

| |

| |c) |The document is validated according to XDR Schema. | | | |

| |

|274. |Which of the following statements is/are true? |[2.0] |

| |

| |a) |The class XmlLinkedNode provides a means to return |c) |The class XmlLinkedNode provides a means to | |

| | |only the node immediately before the current node. | |return the node immediately before or after the | |

| | | | |current node. | |

| |

| |b) |The class XmlLinkedNode provides a means to only |d) |All of the above. | |

| | |return the node immediately after the current node.| | | |

| |

|275. |Which of the following statements is/are true regarding the Document Object Model implementation in .NET? |[2.0] |

| |

| |a) |It supports the W3C DOM Level 1 specification only.|c) |It supports the W3C DOM Level 1 and Core DOM | |

| | | | |Level 2 specification only. | |

| |

| |b) |It supports the W3C DOM Level 2 specification only.|d) |It supports the W3C DOM Level 3 specification | |

| | | | |only. | |

| |

|276. |Which of the following statements are true? |[2.0] |

| |

| |a) |An XmlNode is an abstract class that represents |c) |An XmlNode is an abstract class that represents | |

| | |multiple nodes in an XML document. | |a single node in an XML document. | |

| |

| |b) |The class XmlNode implements the class XmlDocument.|d) |The class XmlDocument implements the class | |

| | | | |XmlNode. | |

| |

|277. |Which of the following statements is true? |[2.0] |

| |

| |a) |The class XmlNodeReader uses an XmlNode as its |c) |All of the above. | |

| | |source instead of a stream. | | | |

| |

| |b) |The class XmlTextReader can work with either—a | | | |

| | |stream-based object or a TextReader-based object. | | | |

| |

|278. |Which of the following statements are true? |[2.0] |

| |

| |a) |An XmlReader is an abstract class that provides |c) |An XmlReader can read XML data in a backward | |

| | |fast and un-cached XML data. | |direction. | |

| |

| |b) |An XmlReader is a forward only reader. |d) |All of the above | |

| |

|279. |Which of the following statements is true? |[2.0] |

| |

| |a) |The class XmlDataDocument allows mixing of XML and |c) |All of the above. | |

| | |relational data in the same view. | | | |

| |

| |b) |The class XmlURLResolver resolves external XML- | | | |

| | |based resources such as DTD and schema references | | | |

| | |by the URI. | | | |

| |

|280. |Which of the following classes is derived from the XmlReader class? |[2.0] |

| |

| |a) |XmlTextReader |c) |XmlValidatingReader | |

| |

| |b) |XmlNodeReader |d) |All of the above | |

| |

|281. |Which of the following statements are true? |[2.0] |

| |

| |a) |The Schemas property of XmlValidatingReader holds |c) |The XmlSchemaCollection object holds the | |

| | |an XmlSchemaCollection object. | |preloaded XSD and XDR schema. | |

| |

| |b) |The Auto property of XmlValidatingReader holds an |d) | | |

| | |XmlSchemaCollection object | | | |

| |

|282. |Consider the snippet given below: |[2.5] |

| | | |

| |…… | |

| |string filename=“..\\..\\names.xml”; | |

| |XmlTextReader tr = new XmlTextReader(filename); | |

| |…… | |

| |Which of the following is true regarding the above code? | |

| |

| |a) |The XmlTextReader object is initialized but no node|d) |A second call to tr.Read() will move to the next| |

| | |is selected. | |node in the document. | |

| |

| |b) |The XmlTextReader object is initialized and XML |e) |All of the above. | |

| | |Declaration node is selected. | | | |

| |

| |c) |When the method Read() is called on the object tr | | | |

| | |for the first time, the XML Declaration node is | | | |

| | |returned. | | | |

| |

|283. |Which of the following statements are true? |[2.5] |

| |

| |a) |The property HasValue is used to check if the node |d) |The method ReadStartElement checks whether the | |

| | |has a value. | |current node is the starting element and | |

| | | | |simultaneously moves to the next node. | |

| |

| |b) |The property HasAttributes is used to check if the |e) |All of the above. | |

| | |node has any Attributes. | | | |

| |

| |c) |The method ReadStartElement only checks whether the| | | |

| | |current node is the starting element. | | | |

| |

|284. |Which of the following can be used to find the element nodes in a document and display all the attributes |[2.5] |

| |associated with it? | |

| |(Note:The variable tr is the XmlTextReader object.) | |

| |

| |a) |While(tr.Read()) |c) |While(tr.Read()) | |

| | |{ | |{ | |

| | |if (tr.NodeType == | |if (tr.NodeType == XmlNodeType.Element) | |

| | |XmlNodeType.Element) | |{ | |

| | |{ | |for(int i=0 ; i | |

| |

| |b) | |d) | | |

| | |Enter Number | |Enter Number | |

| | | | | | |

| | |SoftkeyLabel=”Enter” /> | |< mobile:Link runat=”server” | |

| | |< /mobile:Form > | |NavigateURL=”#Result” Text=”Enter” | |

| | | | |SoftkeyLabel=”Enter” /> | |

| | | | | | |

| |

|438. |WAP supports more than one image format. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|439. |The ________ image format is supported by WAP. |[0.5] |

| |

| |a) |GIF |b) |WBMP | |

| |

|440. |_______ can display JPEG images. |[0.5] |

| |

| |a) |Mobile Cell Phones |b) |PDAs | |

| |

|441. |The ________ tag can be used to display JPEG images. |[0.5] |

| |

| |a) | |b) | | |

| |

|442. |The Mobile Internet Toolkit eases the development of mobile web applications. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|443. |PDAs can support upto 800x600 resolution for images. |[0.5] |

| |

| |a) |True |b) |False | |

| |

|444. |The control allows ______ methods for |[0.5] |

| |entering a date. | |

| |

| |a) |Three |b) |Two | |

| |

|445. |The mobile control generates WML along with ________. |[0.5] |

| |

| |a) |XHTML |b) |HTML | |

| |

|446. |Which of the following are the validation controls provided with |[1.0] |

| |the Mobile Internet Toolkit? | |

| |

| |a) | | | | |

| |

|447. |Which of the following are the validation controls provided with the Mobile Internet Toolkit? |[1.0] |

| |

| |a) | | | | |

| |

|448. |Which of the following is true regarding the list control? |[1.0] |

| |

| |a) |It provides users with non-interactive lists of |c) |It allows the user to call a particular | |

| | |plain text, or links. | |telephone number. | |

| |

| |b) |It is used to display images on a mobile device. |d) |It facilitates the user in entering a date. | |

| |

|449. |Which of the following is true regarding the Image control? |[1.0] |

| |

| |a) |It provides users with non-interactive lists of |c) |It allows the user to call a particular | |

| | |plain text, or links. | |telephone number. | |

| |

| |b) |It is used to display images on a mobile device. |d) |It facilitates the user in entering a date. | |

| |

|450. |Statement 1: The control allows the user to call a particular telephone number. |[1.0] |

| |Statement 2: When the user interacts with the control it initiates a call to the specified number. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|451. |Which of the following statements are true regarding the methods of the Calendar control? |[1.0] |

| |Statement 1: It provides a method which gives a conventional way of entering a date in the format MM/DD/YYYY. | |

| |Statement 2: It provides a method that allows the user to select a month, a week and then the day. | |

| |

| |a) |Statement 1 is true. |c) |Statement 2 is true. | |

| |

| |b) |Statement 1 is false. |d) |Statement 2 is false. | |

| |

|452. |Which of the following are the properties that allow you to change the visual features of mobile controls? |[1.0] |

| |

| |a) |BackGroundColor |c) |Font | |

| |

| |b) |ForeGroundColor |d) |Wrapping | |

| |

|453. |Which of the following snippets of code is used to display |[1.5] |

| |an image file rainy.wbmp? | |

| |

| |a) | | | | |

| | | | | | |

| |

| |b) | | | | |

| | | | | | |

| |

|454. |Which of the following is used to create a list control that contains the linked items “Aptech”, ”Asset”, ”Arena” |[1.5] |

| |and ”International”? | |

| |

| |a) | | |

| | | | | | |

| | | | | | |

| | | | | | |

| | | | | | |

| | | | | | |

| |

| |b) | | |

| | | | | | |

| | | | | | |

| | | | | | |

| | | | | | |

| | | | | | |

| |

|455. |Which of the following is true regarding the attribute DataMember of the control? |[1.5] |

| |

| |a) |It is used when data is bound to the list using a |c) |It is used to specify whether the list should be| |

| | |DataSet. | |Bulleted or Numbered or None. | |

| |

| |b) |It specifies the Data Source for the list when |d) |It determines whether to render the list items | |

| | |using data binding. | |as links or not. | |

| |

|456. |Which of the following is true regarding the attribute DataSource of the control? |[1.5] |

| |

| |a) |It is used to specify whether the list should be |c) |It determines whether to render the list items | |

| | |Bulleted or Numbered or None. | |as links or not. | |

| |

| |b) |It specifies the Data Source for the list when |d) |It specifies the number of items in the list. | |

| | |using data binding | | | |

| |

|457. |Which of the following are not true regarding the Smart Device Extensions for Visual ? |[1.5] |

| |

| |a) |The desktop style applications cannot be developed |c) |Their applications can easily consume XML based | |

| | |for mobile devices. | |Web services making the integration of mobile | |

| | | | |devices with other systems easy. | |

| |

| |b) |It enables to create mobile applications for the |d) |Both b and c | |

| | |Pocket PC and future devices based on the next | | | |

| | |version of the Microsoft Windows CE operating | | | |

| | |system. | | | |

| |

|458. |Which of the following are true regarding the attributes of the control ? |[1.5] |

| |

| |a) |The AlternateText attribute determines the text |c) |The NavigateURL attribute holds the URL to which| |

| | |that is to be displayed in case the image cannot be| |the image is linked. | |

| | |displayed on the mobile device. | | | |

| |

| |b) |The ImageReference attribute holds the id of any |d) |All of the above. | |

| | |other control containing the image | | | |

| | |to be displayed. | | | |

| |

|459. |Which of the following is true regarding the attribute Decoration of the control? |[1.5] |

| |

| |a) |It is used when data is bound to the list using a |c) |It is used to specify whether the list should be| |

| | |DataSet. | |Bulleted or Numbered or None. | |

| |

| |b) |It specifies the Data Source for the list when |d) |It determines whether to render the list items | |

| | |using data binding. | |as links or not. | |

| |

|460. |Which of the following statements are not true regarding the attributes of the control? |[1.5] |

| |

| |a) |The attribute FirstDayOfWeek sets the second day of|c) |The attribute ShowDayHeader set to either true | |

| | |the week to be a Monday | |or false, determines whether to show day names | |

| | | | |or just the dates. | |

| |

| |b) |The attribute SelectedDate sets/gets the selected |d) |All of the above. | |

| | |date | | | |

| |

|461. |Which of the following statements are right? |[2.0] |

| |

| |a) | is used for displaying large |c) | enables to define a list of | |

| | |volumes of text at run-time. | |items where each item is the visual | |

| | | | |representation of an object. | |

| |

| |b) | is used as a container for other | | | |

| | |controls including the other panels. | | | |

| |

|462. |Which of the following statements are true regarding the attributes of the control ? |[2.0] |

| |

| |a) |The attribute DataTextField specifies the field to |c) |Both a and b | |

| | |use for item text values during databinding. | | | |

| |

| |b) |The attribute DataValueField specifies the field to| | | |

| | |use for item value values during databinding. | | | |

| |

|463. |Which of the following statements are true regarding the events of the control ? |[2.0] |

| |

| |a) |The attribute VisibleDate is used to set the month |c) |The default value for the attribute | |

| | |that is to be displayed. | |SelectionMode is dayweek. | |

| |

| |b) |The event OnSelectionChanged occurs when the user |d) |All of the above. | |

| | |selects a different date in the calendar. | | | |

| |

|464. |Consider the following statements regarding Wireless Telephony Application? |[2.0] |

| |Statement 1: The WTA server is an origin or a gateway server that responds to requests from the WAP client | |

| |directly. | |

| |Statement 2: The WTA server is used to provide WAP access to features of the wireless network provider’s | |

| |telecommunications infrastructure. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

|465. |Which of the following are true regarding the events of the control ? |[2.0] |

| |

| |a) |The attribute AlternateFormat specifies the text to|c) |The attribute NavigateURL specifies the target | |

| | |be output to devices incapable of making a phone | |URL for non-calling devices. | |

| | |call. | | | |

| |

| |b) |The attribute AlternateURL specifies the target URL|d) |All of the above. | |

| | |for non-calling devices. | | | |

| |

|466. |Which of the following statements is true regarding the upcoming technology HSCSD? |[2.0] |

| |

| |a) |It is a technology being implemented in some GSM |c) |It is very expensive for the user as he needs to| |

| | |networks which makes it possible to use several | |pay for the multiple time slots. | |

| | |time slots simultaneously when sending or receiving| | | |

| | |data. | | | |

| |

| |b) |It increases the data transmission speed. |d) |All of the above. | |

| |

|467. |Which of the following statements are true regarding the upcoming technology EDGE? |[2.0] |

| |

| |a) |It is a faster version of GSM. |c) |It enables the delivery of Multimedia content | |

| | | | |and other broadband applications to mobile | |

| | | | |phones and computer users. | |

| |

| |b) |It has been designed to deliver data rates of upto |d) |The EDGE standard is built on the existing GSM | |

| | |9.6 Kbps. | |standard, using the same TDMA frame structure | |

| | | | |and the existing cell arrangements. | |

| |

|468. |Which of the following statements are true? |[2.5] |

| |

| |a) |Cellular systems are mainly Circuit Switched with |c) |Packet switched connection using the Internet | |

| | |connections always dependant on Circuit | |Protocol (IP) means that there is no virtual | |

| | |availability. | |connection available to any other end point in | |

| | | | |the network. | |

| |

| |b) |Packet switched connection using the Internet |d) |Packet switched connection makes it possible to | |

| | |Protocol (IP) means that a virtual connection is | |provide new services such as alternative billing| |

| | |always available to any other end point in the | |methods like, pay per bit, pat per session, flat| |

| | |network. | |rate, asymmetric bandwidth and others. | |

| |

|469. |Consider the wml deck that has a card with an id “main”. The “main” card displays a table with one row and two columns, |[2.5] |

| |with each cell containing an image. The image files are rainy.wbmp and cloudy.wbmp. | |

| |Which of the following code satisfies the above requirement? | |

| |

| |a) | |c) | | |

| | |Table | |Table | |

| | | | | | |

| | | | | | |

| | | | | | |

| | | | | | |

| |

| |b) | |d) | | |

| | |Table | |Table | |

| | | | | | |

| | | | | | |

| | | | | | |

| | | | | | |

| |

|470. |Which of the following statements are true regarding the control ? |[2.5] |

| |

| |a) |The Mobile Internet Toolkit need not require adding|c) |To refer to the filters in the web.config file, | |

| | |filters to the web.config file. | |the element is placed inside | |

| | | | |the element. | |

| |

| |b) |The web.config file consisting of filters is to be |d) |The element can contain more | |

| | |checked against the device capabilities stored in | |than one elements that allow you to | |

| | |machine.config file. | |make modifications to the | |

| | | | |control, based on the specified filters. | |

| |

|471. |Which of the following statements is true regarding the design objectives of GPRS technology? |[2.5] |

| |

| |a) |It uses packet-switched resource allocation, that |c) |Efficient delivery of SMS’s over the GPRS radio | |

| | |is, resources are allocated only when data is to be| |interface. | |

| | |sent or received. | | | |

| |

| |b) |Flexible channel allocation: one to eight time |d) |All of the above. | |

| | |slots and available resources are shared by active | | | |

| | |users. | | | |

| |

|472. |Which of the following statements are true regarding GPRS technology? |[2.5] |

| |

| |a) |No Hardware change is needed in Base Transceiver |d) |High throughput over the air and needs longer | |

| | |Station of GSM. | |access time to network. | |

| |

| |b) |The GPRS network is scalable. |e) |All of the above. | |

| | | | | | |

| |c) |Need to support GPRS is only through mobile. | | | |

| |

|473. |The .Net framework security policy model provides which of the following levels of policies |[2.0] |

| |

| |a) |Enterprise |c) |Machine | |

| |

| |b) |User |d) |Data | |

| |

|474. |The .Net framework offers a mechanism called ______________ that assists us in protecting application systems. |[1.5] |

| |

| |a) |Code Access Security |c) |Code Security | |

| |

| |b) |Access Code Security |d) |Access Security | |

| |

|475. |Select commonly used security measures |[2.0] |

| |

| |a) |Security Policies |c) |Cryptography | |

| |

| |b) |Roles and Permissions |d) |Code Security | |

| |

|476. |Code Access Security is based on 2 concepts : |[2.0] |

| |

| |a) |Group Permissions |c) |Code Permissions | |

| |

| |b) |Code Groups |d) |Permissions | |

| |

|477. |Which are the two main types of cryptographic algorithms |[2.0] |

| |

| |a) |Security |c) |Symmetric | |

| |

| |b) |Systematic |d) |Asymmetric | |

| |

|478. |We can secure our ASP .Net application by performing the following actions |[2.0] |

| |

| |a) |Authentication |c) |Impersonation | |

| |

| |b) |Authorization |d) |Secure code | |

| |

|479. |The .Net framework security model defines a class called __________ to take care of security related runtime |[1.5] |

| |errors | |

| |

| |a) |Exception |c) |SecurityException | |

| |

| |b) |SecurityExceptions |d) |SecureException | |

| |

|480. |Statement 1: File Authorization is performed by the FileAuthorizationModule class. |[2.0] |

| |Statement 2: URLAuthorization class performs URL authorization. | |

| |

| |a) |Statement 1 is true |c) |Statement 2 is true | |

| |

| |b) |Statement 1 is false |d) |Statement 2 is false | |

| |

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download