Ask Question
8 October, 14:29

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. 8 October, 15:31
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers