Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 13 pages
Exam (elaborations)

EGR 1400 PAPER ACTUAL QUESTIONS AND ANSWERS SURE A.pdf

Document preview thumbnail
Preview 2 out of 13 pages

EGR 1400 PAPER ACTUAL QUESTIONS AND ANSWERS SURE A.pdf

Content preview

EGR 1400 PAPER ACTUAL QUESTIONS AND
ANSWERS SURE A+
✔✔int.TryParse(txtVal.Text, out myInt); - ✔✔Which of the following statements will
convert a string in txtVal.Text to an integer variable myInt if the value in the textbox is a
number otherwise it will convert any non-numeric value to a 0?

✔✔form - ✔✔In Lab 4, in order to keep score throughout the game, the variable for
keeping score was a ____ level variable

✔✔c - ✔✔On Lab 3, the ideal weight estimator, it is necessary to change what is
measured when the user selects whether they are Male or Female. This can be
accomplished by:
a.
changing the labels next to the text boxes where the user enters the measurements
using an IF-statement and necessary code in the Group Boxes OptionChanged event.
b.
changing the labels next to the text boxes where the user enters the measurements
using an IF-statement and necessary code on the Changed event of the text box for
each of the measurements.
c.
changing the labels next to the text boxes where the user enters the measurements
using an IF-statement and necessary code in the rdoMale and rdoFemale radio buttons
Click event.
d.
adding an IF-statement and necessary code to the code in the 'Calculate' button that
changes the text in the labels next to the text boxes where the user enters the
measurement.

✔✔The two sets of code are equivalent, but (p) is preferred to (q) because (p) is clearer.
- ✔✔Consider the following two sets of code, p and q.
<p>

, if ((a == 1) && (b == 1))
{
txtBox.Text = "Hi";
}

<q>
if (a == 1)
{
if (b == 1)
{txtBox.Text = "Hi";}
}
Which one of the following statements is true?

a.
(q) is not a valid set of Visual C# instructions.
b.
(p) and (q) will produce different outputs.
c.
The condition statement in (p) is not valid.
d.
The two sets of code are equivalent, but (p) is preferred to (q) because (p) is clearer.

✔✔false - ✔✔int cnt = 4;
if ( int.parse(txtVal1.Text) <= int.parse(txtVal2.Text) )
{
cnt = cnt + int.parse(txtVal2.Text);
Breakpoint 1
}
true or false the program will stop at breakpoint 1 with the txtVal1 = 10 and txtVal2 = 2?

✔✔8 - ✔✔int cnt = 4;
if ( int.parse(txtVal1.Text) <= int.parse(txtVal2.Text) )
{
cnt = cnt + int.parse(txtVal2.Text);
if (cnt > 8)
{
cnt = cnt - 1;
}
else
{
cnt = cnt + 1; (breakpoint 2)
}
}
Given txtVal1.Text = 2 and txtVal2.Text = 4. If the user presses the GO button, what will
Cnt be when C# .NET stops at breakpoint #2?

Document information

Uploaded on
August 9, 2026
Number of pages
13
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$19.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Sold
1
Followers
2
Items
4807
Last sold
1 month ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions