Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
4Activity
0 of .
Results for:
No results containing your search query
P. 1
70_316_126Q

70_316_126Q

Ratings: (0)|Views: 50|Likes:
Published by api-3775463

More info:

Published by: api-3775463 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

1. You use Visual Studio .NET to create a employee database application for your company. Your application contains the following code segment (line numbers are included for reference only)

01 foerach (Employee oEmployee in oCompany.Employees) {
02 bSuccess = RecordsUpdate(oEmployee);
03 }

When you debug your application, you discover that RecordsUpdate sometimes returns a
value of False. As quikly as possible, you need to debug your application and find all
instances where RecordsUpdate returns this value.
What sould you do?

A. Set a breakpoint on line 1. Step trhough code after breakpoint is reached.
B. Set a breakpoint on line 2. Step trhough code after breakpoint is reached.
C. Set a breakpoint on line 1. Set its condition property to !bSuccess and select the Has
changed option.
D. Set a breakpoint on line 2. Set its condition property to bSuccess and select the Is true
option.
E. Set a breakpoint on line 2. Set its condition property to !bSuccess and select the Is true
option.
F. Add a watch expression for bSuccess. Select the option Break when value is true.

Ans. E

2. Another developer creates data files by using a computer that runs a version of
Microsoft Windows XP Professional distribuited in France. This files contain financial
transaction information, including dates, times, and monetary values. The data is stored in
a culture specific format.
You develop a application that uses this data files. You must ensure that your application
correctly interprets all the data, regardless of the culture settings od the client operating
system.
Which code segment sould you add to your application?

A. using System.Threading;
using System.Data;
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

B. using System.Threading;
using System.Data;
Thread.CurrentThread.CurrentCulture = new TextInfo("fr-FR");

C. using System.Threading;
using System.Globalization;
Thread.CurrentThread.CurrentCulture = new CultureInfo("fr-FR");

D. using System.Threading;
using System.Globalization;
Thread.CurrentThread.CurrentCulture = new TextInfo("fr-FR");

Ans. C

3. You develop a windows-based application to manage business contacts. The
application retrieves a list of contacts from a central database. The list is managed locally
in a DataSet object named listDataSet, and it is displayed in a DataGrid control.
You create a procedure that will conduct a search after you enter a combination of
personal name and family name. Your application currently includes the following code
segment:

DataView dv = new DataView();
int i;
dv.Table = listDataSet.Tables(0);
dv.Sort = "FamilyName, PersonalName";
DataGrid1.DataSource = dv;

You need to search for a contact whose personal name is Fukiko and whose family name
is Ogisu. Which code segment should you use?

A. object [] values = {"Ogisu","Fukiku"};
i = dv.Find (values);
DataGrid1.CurrentRowIndex = i;

B. object [] values = {"Ogisu,Fukiku"};
i = dv.Find (values);
DataGrid1.CurrentRowIndex = i;

C. object [] values = {"Fukiku","Ogisu"};
i = dv.Find (values);
DataGrid1.CurrentRowIndex = i;

D. object [] values = {"Fukiku,Ogisu"};
i = dv.Find (values);
DataGrid1.CurrentRowIndex = i;

Ans. A
4. You develop a application that generates random numbers to test statistical data. The
application uses the following code segment:

Random rnd = new Random();
Short num1 = Convert.ToInt16(rnd.Next(35000));
Short num2 = Convert.ToInt16(rnd.Next(35000));
Short num3 = (num1/num2);

When you test your application, you discover that certain exceptions are sometimes
raised by this code. You need to write additional code that will handle all such exceptions.
You want to accomplish this goal by writing the minimum amount of code.

Which segment code sould you use?

A. try {
// existing code goes here
}catch (DivideByZeroException e){

// Insert error-handling code here
}catch (OverflowException e){
// Insert error-handling code here
}catch (NotFiniteNumberException e){
// Insert error-handling code here
}B. try {
// existing code goes here
}catch (ArithmeticException e){
// Insert error-handling code here
}C. try {
// existing code goes here
}catch (DivideByZeroException e){
// Insert error-handling code here
}catch (OverflowException e){
// Insert error-handling code here
}D. try {
// existing code goes here
}catch (OverflowException e){
// Insert error-handling code here
}Ans. B

Activity (4)

You've already reviewed this. Edit your review.
1 hundred reads
saditya76 liked this
vkrm14 liked this
gunabushanam liked this

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->