Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <assert.h>
- static int add(int x, int y) {
- return x+y;
- }
- int main()
- {
- int a = 10;
- int sum = add(a++, a++);
- printf("This should be 21: %d\n", sum);
- printf("a should be 12: %d\n", a);
- assert(sum == 21);
- assert(a == 12);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement