C examples for Operator:Compound Operator
What is the output for compound operator?
#include <stdio.h> int main()/*from w w w . j a v a2 s. co m*/ { int x = 1; int y = 2; x = y * x + 1; //arithmetic operations performed before assignment printf("\nThe value of x is: %d\n", x); x = 1; y = 2; x += y * x + 1; //arithmetic operations performed before assignment printf("The value of x is: %d\n", x); }