Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- main()
- {
- int x,y,z,a,b,c,e,f,g;
- x=1;
- y=3;
- x = y++;
- printf("#1- %d\n",x); /* in the example #1 the value of -x- will stay the same as -y- cause the increasment did not happened yet */
- a=1;
- b=3;
- c = ++b;
- printf("#2- %d\n",c); /* in the example #2 the value of -c- will increase, cause the value is already been added to the value of -b- */
- f=9;
- g=10;
- e = f++ + ++g ; /*here we know that the increasment did not happened yet in the value of -f- (still 9),
- but the increasment of the value of -g- is already increased(from 10 to 11) */
- printf("#3- %d\n",e);
- getchar();
- /* you can do the same thing with the Minus (--). The same thing will happened ex: --a and a--*/
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement