[ create a new paste ] login | about

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

pmg - C, pasted on Dec 10:
1
2
3
4
5
6
7
8
9
10
11
12
#include <stdio.h>

int main(void) {
  int x;
  printf("%d\n", (0 == (x = 0)));
  printf("%d\n", (0 == (x = 1)));
  printf("%d\n", (0 == x = 0));
  printf("%d\n", (0 == x = 1));
  printf("%d\n", ((0 == x) = 0));
  printf("%d\n", ((0 == x) = 1));
  return 0;
}


Output:
1
2
3
4
5
In function 'main':
Line 7: error: invalid lvalue in assignment
Line 8: error: invalid lvalue in assignment
Line 9: error: invalid lvalue in assignment
Line 10: error: invalid lvalue in assignment


Create a new paste based on this one


Comments: