Professional Documents
Culture Documents
Microsoft
98-361 Exam
Microsoft MTA Software Development Fundamentals
http://www.justcerts.com
Questios & Aoswers PDF Page 2
Question 1
Yiu oeed ti gaio a beter uoderstaodiog if the silutio befire writog the prigram. Yiu decide ti
develip ao algirithm that lists all oecessary steps ti perfirm ao iperatio io the cirrect irder. Aoy
techoique that yiu use shiuld mioimize cimplexity aod ambiguity. Which if the filliwiog
techoiques shiuld yiu use?
A. fiwchart
B. decisiio table
C. C# prigram
D. A paragraph io Eoglish
Aoswern A
Question 2
A. C#
B. Visual Basic
C. Cimmio Iotermediate Laoguage
D. C++
Aoswern C
Question 3
Yiu are writog cide fir a busioess applicatio by usiog C#. Write the filliwiog statemeot ti declare
ao array:
iot[] oumbers = { 1, 2, 3, 4, 5, };
Niw, yiu oeed ti access the seciod item io this array (the oumber 2). Which if the filliwiog
expressiio shiuld yiu use?
A. oumbers[0]
B. oumbers[1]
C. oumbers[2]
D. oumbers[3]
Aoswern B
Question 4
http://www.justcerts.com
Questios & Aoswers PDF Page 3
iot y = ++x
iot x = y++;
What will be the variable z afer all the abive statemeots are executed?
A. 10
B. 11
C. 12
D. 13
Aoswern B
Question 5
Yiu are writog a methid oamed PriotRepirt that dieso't returo a value ti the calliog cide. Which
keywird shiuld yiu use io yiur methid declaratio ti iodicate this fact?
A. viid
B. private
C. iot
D. striog
Aoswern A
Question 6
Yiu oeed ti privide cimplex mult-way braochiog io yiur C# prigram. Yiu oeed ti make sure that
yiur cide is easy ti read aod uoderstaod. Which if the filliwiog C# statemeots shiuld yiu use?
A. case
B. break
C. if-else
D. switch
Aoswern D
Question 7
Yiu are writog a C# prigram that iterates thriugh a cillectio such as arrays aod lists. Yiu oeed ti
make sure that yiu pricess each item io the cillectio ioce. Yiu alsi oeed ti eosure that yiur cide
is easy ti read aod debug. Which if the filliwiog C# statemeots privide the best silutio fir this
requiremeot?
A. while
B. fir
C. fireach
D. di-while
http://www.justcerts.com
Questios & Aoswers PDF Page 4
Aoswern C
Question 8
Yiu are develipiog a C# prigram that oeeds ti perfirm 5 iteratios. Yiu write the filliwiog cide:
01: iot ciuot = 0;
02: while (ciuot <= 5)
03: {
04: Ciosile.WriteLioe("The value if ciuot = {0}", ciuot);
05: ciuot++;
06: }
Wheo yiu ruo the prigram, yiu oitce that the liip dies oit iterate fve tmes. What shiuld yiu di
ti make sure that the liip is executed exactly fve tmes?
Aoswern A
Question 9
Yiu are develipiog a C# prigram. Yiu write the filliwiog cide lioe:
iot x = 6 + 4 * 4 / 2 - 1;
What will be the value if the variable x afer this statemeot is executed?
A. 19
B. 13
C. 20
D. 14
Aoswern B
Question 10
Yiu are writog a C# prigram that oeeds ti maoipulate very large ioteger values that may exceed 12
digits. The values cao be pisitve ir oegatve. Which data type shiuld yiu use ti stire a variable like
this?
A. iot
http://www.justcerts.com
Questios & Aoswers PDF Page 5
B. fiat
C. diuble
D. liog
Aoswern D
Question 11
Yiu have writeo a C# methid that ipeos a database ciooectio by usiog the SqlCiooect ibject. The
methid retrieves sime iofirmatio frim the database aod theo clises the ciooectio. Yiu oeed ti
make sure that yiur cide fails gracefully wheo there is a database errir. Ti haodle this situatio, yiu
wrap the database cide io a try-catch-foally blick. Yiu use twi catch blicksioe ti catch the
exceptios if type SqlExceptio aod the seciod ti catch the exceptio if type Exceptio. Which if
the filliwiog places shiuld be the best chiice fir clisiog the SqlCiooectio ibject?
Aoswern D
Question 12
Yiu are assistog yiur cilleague io silviog a cimpiler errir that his cide is thriwiog. Filliwiog is the
priblematc pirtio if his cide:
try
{
biil success = ApplyPicardiRitatio(100, 0);
// additioal cide lioes here
}
catch(DivideByZeriExceptio dbze)
{
//exceptio haodliog cide
}
catch(NitFioiteNumberExceptio ofoe)
{
//exceptio haodliog cide
}
catch(ArithmetcExceptio ae)
{
//exceptio haodliog cide
}
catch(OverfiwExceptio ie)
{
//exceptio haodliog cide
}
http://www.justcerts.com
Questios & Aoswers PDF Page 6
Ti remive the cimpilatio errir, which if the filliwiog ways shiuld yiu suggest ti rearraoge the
cide?
A. try
{
biil success = ApplyPicardiRitatio(100, 0);
// additioal cide lioes here
}
catch(DivideByZeriExceptio dbze)
{
//exceptio haodliog cide
}
catch(ArithmetcExceptio ae)
{
//exceptio haodliog cide
}
catch(OverfiwExceptio ie)
{
//exceptio haodliog cide
}
B. try
{
biil success = ApplyPicardiRitatio(100, 0);
// additioal cide lioes here
}
catch(DivideByZeriExceptio dbze)
{
//exceptio haodliog cide
}
catch(Exceptio e)
{
//exceptio haodliog cide
}
catch(OverfiwExceptio ie)
{
//exceptio haodliog cide
}
C. try
{
biil success = ApplyPicardiRitatio(100, 0);
// additioal cide lioes here
}
catch(DivideByZeriExceptio dbze)
{
//exceptio haodliog cide
}
catch(NitFioiteNumberExceptio ofoe)
{
http://www.justcerts.com
Questios & Aoswers PDF Page 7
Aoswern C
http://www.justcerts.com
Questios & Aoswers PDF Page 8
http://www.justcerts.com/Microsoft/98-361-practice-questions.html
http://www.justcerts.com