Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

7. (TCO 4) The following C# code _____ compile; however, it contains a _____ err

ID: 3771994 • 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

Question 8. 8. (TCO 4) Which part of this expression will be evaluated first?

if (b <= c && d >= e)

(Points : 5)        b <= c
       c || d
       d >= e
       if()

Explanation / Answer

.7. b) will , logical // the write line is execute always as the if statement ended just after the if unsually without any statent.

8.   a)b <= c

9. c)track, sum

10. a)three

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote