#include <stdio.h>

int main() {
    int x = 2;
    int y = 0;

    y = ++x;
    printf("Apres ++x : x = %d, y = %d\n", x, y);

    y= x++;
    printf("Apres x++ : x = %d, y = %d\n", x, y);

    y= --x;
    printf("Apres --x : x = %d, y = %d\n", x, y);

    y= x--;
    printf("Apres x-- : x = %d, y = %d\n", x, y);

    return 0;
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: