[ create a new paste ] login | about

Link: http://codepad.org/CtpEfoHy    [ raw code | output | fork ]

C, pasted on May 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
void main(void){
    int a,b,c;
    a=10,b=100,c=1000;
    printf("a=10,b=100,c=1000;\na=%d, b=%d, c=%d\n\n",a,b,c);
    c=a+++b;
    printf("c=a+++b;\na=%d, b=%d, c=%d\n\n",a,b,c);

    a=10,b=100,c=1000;
    printf("a=10,b=100,c=1000;\na=%d, b=%d, c=%d\n\n",a,b,c);
    c=(a++)+b;
    printf("c=(a++)+b;\na=%d, b=%d, c=%d\n\n",a,b,c);

    a=10,b=100,c=1000;
    printf("a=10,b=100,c=1000;\na=%d, b=%d, c=%d\n\n",a,b,c);
    c=a+(++b);
    printf("c=a+(++b);\na=%d, b=%d, c=%d\n\n",a,b,c);
}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
a=10,b=100,c=1000;
a=10, b=100, c=1000

c=a+++b;
a=11, b=100, c=110

a=10,b=100,c=1000;
a=10, b=100, c=1000

c=(a++)+b;
a=11, b=100, c=110

a=10,b=100,c=1000;
a=10, b=100, c=1000

c=a+(++b);
a=10, b=101, c=111



Create a new paste based on this one


Comments: