7. (TCO 4) The following C# code _____ compile; however, it contains a _____ err
ID: 3771965 • Letter: 7
Question
7. (TCO 4) The following C# code _____ compile; however, it contains a _____ error.
int x = 15, y = 10;
if (x < y);
Console.WriteLine("x is less than y");
(Points : 5) will, compiler
will, logical
will not, compiler
will not, logical
if (b <= c && d >= e)
double sum = 0, height = 2.0, stop =10, max = 50;
int track = 0, num = 0;
while (num <= stop)
{
sum = sum + height * num;
if (sum <= max)
track++;
num++;
}
int i = 1, j = 1;
for (i = 1; i < 4; i++)
{
for (j = 1; j < 4; j++)
{
Console.Write("{0}{1} ", i, j);
}
}
three
four
nine
16
1. (TCOs 7, 8) Which is a valid overloaded version of the following method?
float DetermineResults(float num1, float num2)
(Points : 5) float DetermineResults(double num1, float num2)
float DetermineTheResults(float num1, float num2)
void DetermineResults(float num1, float num2)
double DetermineResults(float num1, float num2)
int[] courses = {2,3,5,6,4,5};
Array.Sort(courses);
foreach (int val in courses)
Console.Write("{0} ", val);
File.Create("work.doc");
File.CreateNew(“work.doc”);
File myFile = new File(“work.doc”);
File myFile = new FileStream(“work.doc”);
if (b <= c && d >= e)
(Points : 5) b <= cc || d
d >= e
if()
Explanation / Answer
NOTE:
These are all Direct Questions ,Thoery Questions
12. File myFile = new File(“work.doc”);
11.ReadChar(), StreamReader
10.IO.Stream, IO.StreamReader
9.a copy of the array
8.decimal price[] = new decimal[4];
7. 2 3 4 5 5 6
As it Sorts values..
6.Click()
5.RadioButton, MenuStrip
4.Label
3.mthd1
2. Console.PrintLine();
1. void DetermineResults(float num1, float num2)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.