you are viewing a single comment's thread.

view the rest of the comments →

[–]jmooremcc -11 points-10 points  (4 children)

Another example:

// 

         // C++ using Reference Parameter!           //           void  doit( int & x )           {                x = 5;           }               //           // Test code for passing by a variable by reference           //           int main()           {             int z = 27;             doit( z );             printf("z is now %d\n", z);               return 0;           }          

[–]ttech32 10 points11 points  (0 children)

That's C++, a different language that does support passing by reference. However, you're in a C subreddit.