Ask Question
14 January, 19:41

If variable x has value 2 and y has value 1, which values could result from the following Jack expression?

x + 3 * 4 - y

+5
Answers (1)
  1. 14 January, 20:46
    0
    The result of the given expression is 13.

    Explanation:

    Here x and y are the two variable which has value 2 and 1 respectively.

    x+3*4-y

    Here operator * is more precedence then that + operator so

    =2 + (3*4) - 1

    2+12-1 now + operator is more precedence then that - operator so

    = (2+12) - 1

    = (14-1)

    =13

    Following are the program in C language

    #include / / header file

    int main () / / main function

    {

    int x=2, y=1; / / variable declaration

    printf ("%d", x+3*4-1); b/ / final result

    return 0;

    }

    Output:13
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “If variable x has value 2 and y has value 1, which values could result from the following Jack expression? x + 3 * 4 - y ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers