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

5. (TCO 4) C# operators such as > and < allow you to _____ data. (Points : 3) ad

ID: 3760827 • Letter: 5

Question

5. (TCO 4) C# operators such as > and < allow you to _____ data. (Points : 3)        add
       multiply
       average
       compare

       catch, finally
       catch, try
       try, catch
       try, finally

Question 6. 6. (TCO 4) Which of the following is true about the IF/ELSE decision structure? (Points : 3)        IF statements always contain a Boolean expression.
       a single statement after an IF must be surrounded with curly braces.
       You must always match an IF with an ELSE.
       IF/ELSE structures cannot be nested.

Explanation / Answer

Question5:Answer

Compare Operator

1. Add-- (+)
2.Multiply --(*)
3.Average--(it computes average of numbers).
4.compare (> and <) it compare two or more values return value as TRUE or FALSE.

Question 6: Answer

IF statements always contain a Boolean expression. (TRUE , it returns boolea values like TRUE or FALSE)

a single statement after an IF must be surrounded with curly braces. (false braces are optional for single statements)
You must always match an IF with an ELSE. ( false no need to match if and else statements)
IF/ELSE structures cannot be nested. (false . it can be nested).

Question 7:Answer

int x = 2, y = 3;
if (x > y);
       Console.WriteLine(“x is greater than y”);

will,syntax

Reason :after if condition have semicolumn.

if (x>y)

error: if(x>y);


Question 8 : Answer

Below all False statements. 6>6 (it returns false)
5>=0 (it returns false) 5<=12(it returns false) 7!=8 (it returns false)

(c – 2) > b   ==> (8-2)>6==> 6>6
a >= 0         ===> 5>=0
a <= (b * 2)===> 5<=(6*2) ===> 5<=12
(2 + a) != c ===> (2+5)!=8 ==> 7!=8


Question 9 : Answer

            int x = 3, y = 5;
            if (x > y)
            {
                Console.Write("A, ");
                if (x + 1 > y)
                    Console.Write("B, ");
                else
                    Console.Write("C, ");
            }
            else
                Console.Write("D, ");


Output is D,

3>5 it returns false value it no need to go if statements.
directly go to else statement.

Question 10:Answer

try,Finally

because try it creates run time errors where is finally it does not depend on the exceptions.Program will execute.
where as catch block to allow exceptions it continue witout even resetting the trace.

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