0

programming languages Online Quiz - 88

Description: programming languages Online Quiz - 88
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

SNOBOL?

  1. StriNgent Object symBOlic Language

  2. Software Object symBOlic Language

  3. Software Oriented symBOlic Language

  4. StriNgent Oriented symBOlic Language


Correct Option: D

You create 4 forms FormA, FormB, FormC and FormD. You want to allow users to open FormA, FormB and FormC at the same time within FormD. Which properties do you need to set?

  1. IsMdiChild on Forms A,B and C; and IsMdiParent on FormD.

  2. MdiParent on Forms A,B and C; and IsMdiContainer on FormD.

  3. IsMdiChild on Forms A,B and C; and IsMdiContainer on FormD.

  4. MdiParent on Forms A,B and C; and IsMdiParent on FormD.


Correct Option: B

You want to create custom properties for your control, which the user can set using the Properties window of the Visual Studio IDE. What attribute can you use to control the visibility of the properties in the Properties window in the Visual Studio IDE?

  1. DebuggerBrowsable

  2. ComVisible

  3. Browsable

  4. DisplayBrowsable


Correct Option: C

You have added a button named Bt1 to your form, whose Text is “Go”. You want to assign a shortcut to the button, so that whenever a user presses ALT+G, the Click event of the button Bt1 is raised. What code should you use?

  1. Bt1.Text = @”Go”;

  2. Bt1.Text = “&Go”;

  3. Bt1.Text = “&&Go”;

  4. Bt1.Text = “@Go”;


Correct Option: B

AI Explanation

To assign a shortcut to the button Bt1 so that the Click event is raised when the user presses ALT+G, you need to use the '&' character in the button's text. This character is used to define the shortcut key.

The correct code to assign the shortcut would be:

Bt1.Text = "&Go";

Option A) Bt1.Text = @”Go”; - This option is incorrect because it does not include the '&' character to define the shortcut key.

Option B) Bt1.Text = “&Go”; - This option is correct because it includes the '&' character to define the shortcut key as ALT+G.

Option C) Bt1.Text = “&&Go”; - This option is incorrect because it includes two '&' characters, which is not necessary and would not work as a shortcut key.

Option D) Bt1.Text = “@Go”; - This option is incorrect because it includes the '@' character, which is not used to define a shortcut key.

The correct answer is Option B.

You are creating a setup and deployment project for your application . You want to ensure that the .NET Framework 2.0 is installed on the computers of the users who want to install your application. Which deployment editor should you use?

  1. Registry Editor

  2. Launch Conditions Editor

  3. File System Editor

  4. Required Components Editor


Correct Option: B

You use a TransactionScope in your application in your application in order to use transaction semantics. What code should you use in order to commit the transaction within the transaction scope?

  1. TransactionScope.Completed = true;

  2. TransactionScope.IsCompleted = true;

  3. TransactionScope.Complete();

  4. TransactionScope.Commit();


Correct Option: C

You decide to use named parameters in a SqlCommand object in order to execute SQL queries on a database. You have a parameter named “CustomerName”. How do you refer to it within the SQL query text in the SqlCommand object?

  1. “?CustomerName”

  2. “@CustomerName”

  3. “%CustomerName”

  4. “#CustomerName”


Correct Option: B

AI Explanation

To refer to a named parameter within the SQL query text in a SqlCommand object, you would use the "@" symbol followed by the parameter name.

So the correct way to refer to the parameter named "CustomerName" in the SQL query text would be:

B. "@CustomerName"

You have a .xml file, and the corresponding .xsd. Which class should you use to validate the xml against the corresponding schema file?

  1. XmlValidatingReader

  2. XmlDictionaryReader

  3. XmlReader

  4. XmlSchemaReader


Correct Option: C

Your application assemblies need to be installed into the Global Assembly Cache. What deployment strategy should you adopt?

  1. Create a Setup Application

  2. Use XCOPY to copy the files

  3. Create a CAB project

  4. Use ClickOnce.


Correct Option: A

You want to create a reusable control by combining existing Windows Controls in order to use it in various of your applications. What should the base class of your control be?

  1. System.Windows.Forms.UserControl

  2. System.Windows.Forms.Control

  3. System.Windows.Forms.WindowsControl

  4. System.Windows.Forms.Component


Correct Option: A

You want to access web sites on the internet using HTTP. Which of the classes below can you use?

  1. System.Net.HttpClient

  2. System.Net.WebClient

  3. Sytem.Net.InetClient

  4. Sytem.Net.SoapClient


Correct Option: B

What is the Web.config file used for ?

  1. To store the global information and variable definitions for the application

  2. Configures the time that the server-side codebehind module is called

  3. To configure the web server

  4. To configure the web browser


Correct Option: A

After capturing the SelectedIndexChanged event for a ListBox control, you find that the event handler doesn’t execute. What could the problem be ?

  1. The AutoEventWireup attribute is set to False

  2. The AutomaticPostBack attribute is set to False

  3. The codebehind module is not properly compiled

  4. The ListBox must be defined WithEvents


Correct Option: B

When an ASP.NET server control is added to a Web Form, Visual Studio .NET adds one item to the class for the form. What item is added ?

  1. The event registration

  2. A protected class member for the control

  3. A default event handler for the click event

  4. A default class that inherits from the control’s base class


Correct Option: C

What attribute must be set on a validator control for the validation to work ?

  1. Validate

  2. ValidateControl

  3. ControlToBind

  4. ControlToValidate


Correct Option: D

In ASP.NET if one uses windows authentication the current request attaches an object called as

  1. Serialization

  2. WindowsPrincipal

  3. WindowsDataset

  4. None of above


Correct Option: B

Given an ASP.NET Web Form called WebForm1, what class does the WebForm1 class inherit from by default ?

  1. System.Web.Form

  2. System.Web.GUI.Page

  3. System.Web.UI.Page

  4. System.Web.UI.Form


Correct Option: C

What method must be overridden in a custom control ?

  1. The Paint() method

  2. The Control_Build() method

  3. The Render() method

  4. The default constructor


Correct Option: C

The ASP.NET directive that lets you cache different versions of a page based on varying input parameters, HTTP headers and browser type is

  1. @OutputCache

  2. @CacheOutput

  3. @PageCache

  4. @CacheAll


Correct Option: A

AI Explanation

To answer this question, you need to understand the ASP.NET directive for caching pages.

Option A) @OutputCache - This option is correct. The @OutputCache directive in ASP.NET allows you to cache different versions of a page based on varying input parameters, HTTP headers, and browser type. It is used to improve performance by caching the output of a page or user control.

Option B) @CacheOutput - This option is incorrect. There is no such directive in ASP.NET called @CacheOutput.

Option C) @PageCache - This option is incorrect. There is no such directive in ASP.NET called @PageCache.

Option D) @CacheAll - This option is incorrect. There is no such directive in ASP.NET called @CacheAll.

The correct answer is option A) @OutputCache. This option is correct because the @OutputCache directive is used to cache different versions of a page based on varying input parameters, HTTP headers, and browser type.

What method(s) must be used with the Application object to ensure that only one process accesses a variable at a time ?

  1. Synchronize()

  2. Lock() and UnLock()

  3. Lock()

  4. Asynchroize()


Correct Option: B
- Hide questions