home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / qc_prog / chap03 / relation.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-04-06  |  516 b   |  18 lines

  1. /* relation.c -- shows effect of      */
  2. /*               relational operators */
  3.  
  4. main()
  5. {
  6.     int a = 5, b = 3, c = 4;
  7.     printf("a = %d\t b = %d\t c = %d\n", a, b, c);
  8.  
  9.     printf("Expression a > b has a value of %d\n",
  10.             a > b);
  11.     printf("Expression a == c has a value of %d\n",
  12.             a == c);
  13.     printf("Expression a > (b + c) has a value of %d\n",
  14.             a > (b + c));
  15.     printf("Expression a = b has a value of %d\n",
  16.             a = b); /* what happened here? */
  17. }
  18.