Ask Question
20 August, 13:18

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

x + 3 * 4 - y

+2
Answers (1)
  1. 20 August, 13:37
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers