Operator precedence test between sum and product - C Data Type

C examples for Data Type:int

Description

Operator precedence test between sum and product

Demo Code

#include <stdio.h>

int main(void)
{
    int top, score;
    /*from  w w  w  . j a  v a2  s .c om*/
    top = score = -(2 + 5) * 6 + (4 + 3 * (2 + 3));
    printf("top = %d, score = %d\n", top, score);
    
    return 0;
}

Result


Related Tutorials