home *** CD-ROM | disk | FTP | other *** search
/ C++ for Dummies (3rd Edition) / C_FD.iso / CHAP02 / CHAP02_2.C < prev    next >
C/C++ Source or Header  |  1996-09-02  |  289b  |  16 lines

  1. // Chap02_2.c
  2. void fn(int i)
  3. {
  4.     i = 10;        /*this is legal and the...*/
  5.                    /*...value is now 10 in fn()*/
  6. }
  7.  
  8.  
  9. int main()
  10. {
  11.    int i = 0;
  12.  
  13.    fn(i);           /*only the value 0 is passed to fn()*/
  14.    return 0;        /*i is still 0 upon returning*/
  15. }
  16.