Question Bank Adv .Net and Security in .Net Project

131 507 0
Question Bank  Adv .Net and Security in .Net Project

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

The Obsolete attribute, which is used to specify a method as obsolete, is provided with the .NET framework.

Question Bank Adv Net and Security in Net Project The Obsolete attribute, which is used to specify a method as obsolete, is provided with the NET framework a) True Attributes [0.5] b) DllImport When a program is compiled into a release version, it has fewer overheads and also executes faster compared to a debug version a) True [0.5] b) Properties C# provides the _ attribute for interoperability with Windows DLLs a) Conditional [0.5] b) False are used in C# to add MetaData to classes and assemblies a) [0.5] b) PDB In NET, a dynamic link library is created by default when a project of type console application is built a) True [0.5] b) False When a program is compiled in debug mode, a file with an extension _ is created a) DBP b) False The Conditional attribute enables access to the Win32 API a) True [0.5] b) False [0.5] Windows DLLs have deployment problems like registering the DLL in [0.5] the Windows registry and versioning issues a) True The code residing inside the Windows Dll is known as _ [0.5] code as it has direct access to the memory a) Managed 10 True b) False DllImport True [0.5] b) Conditional An attribute in C# is a declarative tag, which can be used to provide information to the runtime about the behaviour of the C# elements such as classes only a) 14 b) only at the beginning of The _ attribute is used to conditionally prevent or allow execution of a block of code a) 13 [0.5] The Win32 API consists of a set of dlls that contain the necessary [0.5] methods for invoking the system calls a) 12 b) Unmanaged Symbol definition should occur the program a) anywhere in 11 b) False [1.0] b) False 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 is true c) Statement is true b) Statement is false d) Statement is false 15 Which of the following are the steps involved in creating an attribute? [1.0] a) Enclose the attribute in square c) Multiple attributes for a single brackets 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 d) All of the above parameters required to the attribute within parenthesis 16 Which of the following is true? [1.0] a) The DllImport attribute is used to interoperate with code in unmanaged and legacy components c) The methods contained within Windows DLLs can be called within C# programs using the DllImport attribute b) The unmanaged code is the code that has been generated outside the NET environment d) All of the above 17 Which namespace has to be imported in applications for working with [1.0] legacy code? a) System.Runtime.Services b) System.InteropServices 18 c) System.Services d) System.Runtime.InteropService s Which of the following is true when the first parameter passed to [1.0] AttributeUsage attribute is AttributeTargets.All 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 [1.0] AttributeUsage attribute is AttributeTargets.Constructor enumerator? a) The attribute can be applied to any class element b) The attribute can be applied only to constructors 20 c) The attribute can be applied only to Enums d) The attribute can be applied only to Modules Which of the following is true when the first parameter passed to [1.0] AttributeUsage attribute is AttributeTargets.Module enumerator? a) The attribute can be applied to any class element b) The attribute can be applied only to constructors 21 c) The attribute can be applied only to Enums d) The attribute can be applied only to Modules Statement 1: The AllowMultiple property for the AttributeUsage [1.0] attribute indicates whether the attribute may be 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 is true b) Statement is false 22 c) Statement is true d) Statement is false Which of the following is/are true regarding the AttributeUsage attribute? a) If the Inherited property is set to true, the attribute applied to a certain class or interface will be applied to all inherited classes or interfaces c) If the AllowMultiple property is set to false, the compiler will generate an error if the attribute is applied to the same item more than once b) If the Inherited property is set to false, the attribute applied to d) If the AllowMultiple property is set to true, the compiler [1.0] a certain class or interface will be applied to all inherited classes or interfaces 23 will generate an error if the attribute is applied to the same item more than once Statement 1: To read MetaData from a NET component, the assembly [1.0] is first loaded into the running process Statement 2: Assembly.Load(assemblyName) is a static member method of the Assembly namespace a) Statement is true b) Statement is false 24 c) Statement is true d) Statement is false Which of the following is/are true? a) The NET components expose their MetaData through a process known as Reflection [1.0] c) The classes necessary for Reflection can be found in the Namespace System.Reflection b) Reflection covers the d) All of the above various NET base classes 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 [1.5] Assemblies? a) As assemblies are SelfDescribing, they not require registry keys d) The installation of one application does have adverse effects on the other applications b) Due to Versioning, each assembly file reflects or rather exposes the version number to all NET applications e) All of the above 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 b) The code above will display the parameter value passed to attribute existing in the class AttrEx on console 27 c) The code above will give a run time error d) None of the above Consider the snippet below: [1.5] public class CoderAttribute : Attribute { private string cname; public CoderAttribute(string cName) { this.cname =cName; } } Which of the following is/are true regarding the snippet? a) It is mandatory for CoderAttribute class to inherit the Attribute class c) It is not necessary for the CoderAttribute 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 name CoderAttribute forming the name CoderAttributeAttribute b) The compiler does not append the string ‘Attribute’ to the name but leaves the name as CoderAttribute 29 c) CoderAttribute is the only custom attribute defined for the method CalculateBonus d) All of the above Which of the following snippet is correct for the class WriterAttribute [1.5] with the attribute “Writer” that can be 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 [1.5] associated with a method? 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? a) A NET component is a [1.5] d) The CLR can only execute piece of executable code referred to as Assemblies b) c) 32 An assembly is a collection of all information required by the runtime to execute an application code in assemblies e) All of the above An assembly can be only a DLL file 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 d) The Addition method, Calculation.dll must exist either imported from the in the application directory or Calculation.dll, takes in two System32 folder inside the integer parameters and Windows installation directory returns the result as an integer b) The DLL to import is passed as the parameter to the DllImport attribute e) The extern keyword in the declaration of imported method is necessary for using any external methods residing in Dlls c) All of the above 33 Which of the following is/are true? a) An assembly that has been d) The assembly compiled into a PE file has versioning and an extension of exe permissions [1.5] handles security b) The *.exe file in NET e) All of the above Framework is the same as a 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 ensures that the Msg() method will be used only in debug versions of the solution d) The compiler will not generate an error if the method Msg() does not return a void b) The calls to the Msg() method from anywhere in the code in the release version will not be entertained e) All of the above c) The Msg() method is not called in the Release version, but compile time errors are thrown 432 Which of the following are the requirements of the WAP architecture? a) Optimized for narrow-band bearers with potentially high latency d) It does not provide a programming model for telephony services and integration b) Optimized for efficient use of device resources i.e low memory or CPU usage or power consumption e) Only a & b c) Provide support for secure applications and communication as well as facilitate network-operator and third party service provisioning f) [2.5] Only b & c 433 Which of the following are true? [2.5] a) The WAP proxy translates WAP requests to WWW requests thereby allowing the WAP client to submit requests to the web server d) If the web server provides WWW content (HTML), the WAP proxy retrieves it directly from the web server b) The WAP proxy encodes the responses from the web server into the hexadecimal format understood by the client e) If the web server provides WWW content (HTML), a filter is used to translate the WWW content into WAP content by the WAP proxy c) If the web server provides WAP content (WML), the WAP proxy retrieves it directly from the web server 434 Which of the following are true regarding the WAP proxies, gateways [2.5] and servers? a) There exists at least two WAP proxy servers between the user agent and the content server d) The WAP proxy server is responsible for knowing the languages and character sets that each WAP device understands b) The Proxy server is used to translate WAP protocols from the user agent into HTTP, to communicate with the content server and vice –versa e) Only a c) The Proxy servers may need to compile dynamically generated WML and WMLScript programs, coming from the content server, before sending to the user agent 435 Which of the following statements are true regarding WAP? a) Wireless service providers are d) Subscribers gain real, able to offer a new dimension anytime, anywhere of service that complements information access with a the existing features of their simple and effective user networks, while extending interface, available on a subscriber access to the variety of networks and unbounded creativity of the devices Web b) Handset manufacturers can e) All of the options given integrate Microbrowser functionality at minimal cost, as the WAP specification is open and public c) Application developers gain access to a whole new market of information users, while [2.5] protecting and leveraging their current investments in Web technology 436 Which of the following code is relevant for creating a mobile controls page? a) b) d) 437 Consider a mobile control page with a mobile form “Main” having a [2.5] control that reads only numeric values A link that has a text displayed as “Enter” is provided to navigate to the mobile form “Result” within the same page Which of the following snippets of code need to be used for creating the mobile form “Main” described above? a) Enter Number < /mobile:Form > b) Enter Number < mobile:Link NavigateURL=”#Result” Text=”Enter” SoftkeyLabel=”Enter” /> < /mobile:Form > numeric=”false” /> < mobile:Link runat=”server” NavigateURL=”#Result” Text=”Enter” SoftkeyLabel=”Enter” /> < /mobile:Form > d) Enter Number < mobile:Link runat=”server” NavigateURL=”#Result” Text=”Enter” SoftkeyLabel=”Enter” /> 438 WAP supports more than one image format a) True b) False 439 The image format is supported by WAP a) GIF [0.5] b) PDAs 441 The tag can be used to display JPEG images a) [0.5] b) WBMP 440 _ can display JPEG images a) Mobile Cell Phones [0.5] b) [0.5] 442 The Mobile Internet Toolkit eases the development of mobile web applications a) True b) False 443 PDAs can support upto 800x600 resolution for images a) True [0.5] b) False 444 The control allows methods for entering a date a) Three [0.5] b) Two 445 The mobile control generates WML along with a) XHTML [0.5] [0.5] b) HTML 446 Which of the following are the validation controls provided with the Mobile Internet Toolkit? [1.0] a) 447 Which of the following are the validation controls provided with the [1.0] Mobile Internet Toolkit? a) b) 448 Which of the following is true regarding the list control? [1.0] a) It provides users with non- c) It allows the user to call a interactive lists of plain text, particular telephone number or links b) It is used to display images on d) It facilitates the user in a mobile device entering a date 449 Which of the following is true regarding the Image control? [1.0] a) It provides users with non- c) It allows the user to call a interactive lists of plain text, or particular telephone number links b) It is used to display images d) It facilitates the on a mobile device entering a date user in 450 Statement 1: The control allows the user to call a [1.0] particular telephone number Statement 2: When the user interacts with the control it initiates a call to the specified number a) Statement is true c) Statement is true b) Statement is false d) Statement is false 451 Which of the following statements are true regarding the methods of the Calendar control? 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 is true c) Statement is true b) Statement is false [1.0] d) Statement is false 452 Which of the following are the properties that allow you to change the visual features of mobile controls? a) BackGroundColor c) Font b) ForeGroundColor d) Wrapping [1.0] 453 Which of the following snippets of code is used to display an image file rainy.wbmp? [1.5] a) b) 454 Which of the following is used to create a list control that contains the [1.5] linked items “Aptech”, ”Asset”, ”Arena” and ”International”? a) c) b) d) 455 Which of the following is true regarding the attribute DataMember of [1.5] the control? a) It is used when data is c) It is used to specify whether bound to the list using a the list should be Bulleted or DataSet Numbered or None b) It specifies the Data Source for d) It determines whether to the list when using data render the list items as links binding or not 456 Which of the following is true regarding the attribute DataSource of the [1.5] control? a) It is used to specify whether c) It determines whether to the list should be Bulleted or render the list items as links Numbered or None or not b) It specifies the Data Source d) It specifies the number of for the list when using data items in the list binding 457 Which of the following are not true regarding the Smart Device Extensions for Visual Studio.NET? [1.5] a) The desktop style c) Their applications can easily applications cannot be consume XML based Web developed for mobile services making the devices integration of mobile devices with other systems easy b) It enables to create mobile d) Both b and c applications for the 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 c) The NavigateURL attribute determines the text that is to holds the URL to which the be displayed in case the image is linked image cannot be displayed on the mobile device b) The ImageReference attribute d) All of the above holds the id of any 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 c) It is used to specify to the list using a DataSet whether the list should be Bulleted or Numbered or None b) It specifies the Data Source for d) It determines whether to the list when using data render the list items as links binding or not 460 Which of the following statements are not true regarding the attributes of the control? a) The attribute FirstDayOfWeek sets the second day of the week to be a Monday c) The attribute ShowDayHeader set to either true or false, determines whether to show day names or just the dates b) The attribute SelectedDate sets/gets the selected date [1.5] d) All of the above 461 Which of the following statements are right? a) is used c) enables for displaying large volumes of to define a list of items text at run-time where each item is the visual [2.0] 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 [2.0] the control ? a) The attribute DataTextField c) Both a and b specifies the field to 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 [2.0] control ? a) The attribute VisibleDate is c) The default value for the used to set the month that is attribute SelectionMode is to be displayed dayweek b) The event d) All of the above OnSelectionChanged occurs when the user selects a different date in the calendar 464 Consider the following statements regarding Wireless Telephony Application? 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 is true c) Statement is true b) Statement is false d) Statement is false [2.0] 465 Which of the following are true regarding the events of the control ? a) The attribute AlternateFormat specifies the text to be output to devices incapable of making a phone call c) The attribute NavigateURL specifies the target URL for non-calling devices b) The attribute AlternateURL specifies the target URL for non-calling devices [2.0] d) All of the above 466 Which of the following statements is true regarding the upcoming [2.0] technology HSCSD? a) It is a technology being c) It is very expensive for the implemented in some GSM user as he needs to pay for networks which makes it the multiple time slots possible to use several time slots simultaneously when sending or receiving data b) It increases the transmission speed data d) All of the above 467 Which of the following statements are true regarding the upcoming [2.0] technology EDGE? 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 d) The EDGE standard is built data rates of upto 9.6 Kbps on the existing GSM 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 c) Packet switched connection Circuit Switched with using the Internet Protocol connections always (IP) means that there is no dependant on Circuit virtual connection available availability to any other end point in the network b) Packet switched connection d) Packet switched using the Internet Protocol connection makes it (IP) means that a virtual possible to provide new connection is always services such as available to any other end alternative billing methods point in the network like, pay per bit, pat per session, flat 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, 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)

Table

b)

Table

< /wml> 470 Which of the following statements are true regarding the control [2.5] ? a) The Mobile Internet Toolkit c) To refer to the filters in the need not require adding filters web.config file, the to the web.config file element is placed inside the element b) The web.config file consisting of filters is to be checked against the device capabilities stored in machine.config file d) The element can contain more than one elements that allow you to make modifications to the control, based on the specified filters 471 Which of the following statements is true regarding the design [2.5] objectives of GPRS technology? a) It uses packet-switched c) Efficient delivery of SMS’s resource allocation, that is, over the GPRS radio resources are allocated only interface when data is to be sent or received b) Flexible channel allocation: d) All of the above one to eight time slots and available resources are shared by active users 472 Which of the following statements are true regarding GPRS [2.5] technology? a) No Hardware change is d) High throughput over the air needed in Base Transceiver and needs longer access Station of GSM time to network b) The GPRS scalable network is 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 [2.0] following levels of policies a) Enterprise c) Machine b) User d) Data 474 The Net framework offers a mechanism called that [1.5] assists us in protecting application systems a) Code Access Security c) Code Security b) Access Code Security d) Access Security 475 Select commonly used security measures a) Security Policies c) Cryptography b) Roles and Permissions [2.0] d) Code Security 476 Code Access Security is based on concepts : a) Group Permissions c) Code Permissions b) Code Groups d) Permissions [2.0] 477 Which are the two main types of cryptographic algorithms a) Security c) Symmetric b) Systematic [2.0] d) Asymmetric 478 We can secure our ASP Net application by performing the following [2.0] actions a) Authentication c) Impersonation b) Authorization d) Secure code 479 The Net framework security model defines a class called [1.5] to take care of security related runtime errors a) Exception c) SecurityException b) SecurityExceptions d) SecureException 480 Statement 1: File Authorization is performed by the FileAuthorizationModule class Statement 2: URLAuthorization class performs URL authorization a) Statement is true c) Statement is true b) Statement is false d) Statement is false [2.0] ... an empty string 184 Which of the following classes is inherited by the classes [2.0] ServiceProcessInstaller and ServiceInstaller a) ComponentInstall c) ContainerInstall b) ContainerInstaller d)... following is/are true? a) Visual Studio.net generates d) Visual Studio.net generates the service installer class the service installer class ProjectInstaller.cs file ProjectInstall.cs file b) Setting... written in different languages like C#, VB.NET and JScript.NET can be clubbed into a single assembly [1.0] Statement 2: Modules written in different languages such as C#, VB.NET and JScript.NET

Ngày đăng: 09/04/2013, 09:10

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan