Searching for "XYZ."

Q:

Triangle PQR is such that PQ = 9 cm, QR = 6 cm, PR = 7.5 cm and triangle PQR is similar to triangle XYZ. If XY = 18 cm, find the value of YZ.

A) 15 cm B) 18 cm
C) 12 cm D) 9 cm
 
Answer & Explanation Answer: C) 12 cm

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Area
Exam Prep: Bank Exams

Q:

Can we use include ("xyz.PHP") two times in a PHP page "index.PHP"?

Answer

    Yes we can use include("xyz.php") more than one time in any page. but it create a prob when xyz.php file contain some funtions declaration then error will come for already declared function in this file else not a prob like if you want to show same content two time in page then must incude it two time not a prob

Report Error

View answer Workspace Report Error Discuss

Subject: PHP

Q:

You are creating an ASP.NET application for XYZ. The company data is stored in a Microsoft SQL Server 6.5 database. Your application generates accounting summary reports based on transaction tables that contain million of rows.


You want your application to return each summary report as quickly as possible. You need to configure your application to connect to the database and retrieve the data in a away that achieves this goal.


What should you do?

A) Use a SqlConnection object to connect to the database, and use a SqlCommand object to run a stored procedure that returns the data. B) Use an OleDbConnection object to connect to the database, and use an OleDbCommand object to run a stored procedure that returns the data.
C) Configure SQL Server to support HTTP access, and create an XML template to run a stored procedure that returns the data in XML format. D) Use COM interop to create an ADODB.Connection object, and use an ADODB.Command object to run a SQL statement that returns the data.
 
Answer & Explanation Answer: B) Use an OleDbConnection object to connect to the database, and use an OleDbCommand object to run a stored procedure that returns the data.

Explanation:

We need to use an OleDBConnection to connect to SQL Server Version 6.5 (or earlier). 

 

Incorrect Answers:

 

A: We could use a SqlConnection object only if the SQL Server were SQL Server 7.0, 2000 or later.

 

C: HTTP functionality is not required in this scenario. It would introduce unnecessary overhead.

 

D: ADODB is a legacy standard and should not be used here

Report Error

View Answer Report Error Discuss

Q:

You are a member of a team of developers creating several ASP.NET applications for XYZ. You want to create a reusable toolbar that will be used in each of the applications. The toolbar will be displayed at the top of each page viewed by the user.


The contents of the toolbar will vary depending on options each user selects when creating a profile.


You want to be able to add the toolbar to the ASP.NET toolbox for each of the developers on your team.What should you do?

A) Create a new Web Control Library project. Create the toolbar within a Web custom control. B) Add a new Web user control to your ASP.NET project. Create the toolbar within the Web user control.
C) Add a new Web Form to your ASP.NET project. Design the toolbar within the Web Form and save the Web Form with an .ascx extension. D) Add a new component class to your ASP.NET project. Design the toolbar within the designer of the component class.
 
Answer & Explanation Answer: A) Create a new Web Control Library project. Create the toolbar within a Web custom control.

Explanation:

Web custom controls are compiled code, which makes them easier to use but more difficult to create. You can add a Web custom control to the Toolbox and display it in a visual designer with full Properties window support and all the other design-time features of ASP.NET server controls. 

 

Incorrect Answers:

B: Web user controls are easy to make, but they can be less convenient to use in advanced scenarios such as this. Because Web user controls are compiled dynamically at run time they cannot be added to the Toolbox


C: A Web form would be inadequate.

 

D: The Component class Provides the base implementation for the IComponent interface and enables object-sharing between applications. It does not fit in this scenario.

Report Error

View Answer Report Error Discuss

Q:

You are a Web developer for XYZ. You create an ASP.NET application that accesses sales and marketing data. The data is stored in a Microsoft SQL Server 2000 database on a server named XYZ01.


The company purchases a factory automation software application. The application is installed on XYZ01, where it creates a second instance of SQL Server 2000 named Factory and a database named FactoryDB. You connect to FactoryDB by using Windows Integrated authentication.


You want to add a page to your ASP.NET application to display inventory data from  FactoryDB. You use a SqlConnection object to connect to the database. You need to create a connection string to FactoryDB in the instance of SQL Server named Factory on XYZ01. Which string should you use?

A) ?Server=XYZ01;Data Source=Factory; Initial Catalog=FactoryDB;Integrated Security=SSPI? B) ?Server=XYZ01;Data Source=Factory; Database=FactoryDB;Integrated Security=SSP1?
C) ?Data Source=XYZ01\Factory; Initial Category=Factory; Integrated Security=SSP1? D) ?Data Source=XYZ01\Factory; Database=FactoryDB; Integrated Security=SSP1?
 
Answer & Explanation Answer: D) ?Data Source=XYZ01\Factory; Database=FactoryDB; Integrated Security=SSP1?

Explanation:

The Data Source attribute of the connection string contains the name, instance or network address of the instance of SQL Server to which to connect. In this scenario we are to connect to the Factory Instance on XYZ01 so we use XYZ01\Factory as data source. To specify the database we should either use the Database or the Initial Catalog attribute. Here we use Database=FactoryDB.

 

Incorrect Answers:

 

A, B: There is no Server attribute in the connection string. Instead we should use the Data Source attribute to specify the server and the instance.

 

C: There is no Initial Category attribute in the connection string. We can use Database or the Initial Catalog attribute to specify the database.

Report Error

View Answer Report Error Discuss

Q:

You responsible for maintaining an application that was written by a former colleague at XYZ.

 

The application reads from and writes to log files located on the local network. The original author included the following debugging code to facilitate maintenance:

try {
Debug.WriteLine(“Inside Try”);
throw(new IOException());}
catch (IOException e) {
Debug.WriteLine (“IOException Caught”);}
catch (Exception e) {
Debug.WriteLine(“Exception Caught”);}.
finally {
Debug.WriteLine (“Inside Finally”);}
Debug.WriteLine (“After End Try”);

 

Which output is produced by thus code?

A) Inside Try Exception Caught IOException Caught Inside Finally After End Try B) Inside Try Exception Caught Inside Finally After End Try
C) Inside Try IOException Caught Inside Finally After End Try D) Inside Try IOException Caught Inside Finally
 
Answer & Explanation Answer: C) Inside Try IOException Caught Inside Finally After End Try

Explanation:

First the try code runs. Then one single exception, the IOException occurs, not two exceptions.Then the Finally code segments executes. After Finally code bas been executed normal application resumes at the next line after the line that called the error. In this case, the After End Try code runs.

Report Error

View Answer Report Error Discuss

Q:

You develop a Windows-based application that enables to enter product sales. You add a subroutine named XYZ.

 

You discover that XYZ sometimes raises an IOException during execution. To address this problem you create two additional subroutines named LogError and CleanUp. These subroutines are governed by the following rules:

• LogError must be called only when XYZ raises an exception.
• CleanUp must be called whenever XYZ is complete.

 

 You must ensure that your application adheres to these rules. Which code segment should you use?

A) try { XYZ(); LogError(); } catch (Exception e) { CleanUp(e); } B) try { XYZ(); } catch (Exception e) { LogError(e); CleanUp(); }
C) try { XYZ(); } catch (Exception e) { LogError(e); } finally { CleanUp(); } D) try { XYZ(); } catch (Exception e) { CleanUp(e); } finally { LogError(); }
 
Answer & Explanation Answer: C) try { XYZ(); } catch (Exception e) { LogError(e); } finally { CleanUp(); }

Explanation:

We must use a try…catch…finally construct. First we run the Comapany() code in the try block.Then we use the LogError() subroutine in the catch statement since all exceptions are handled here. Lastly we put the CleanUp() subroutine in the finally statement since this code will be executed regardless of whether an exception is thrown or not.

Report Error

View Answer Report Error Discuss