View Single Post
Old 11-03-2004, 11:58 AM   #2 (permalink)
intercodes
 
Ultra Techie

Join Date: Jun 2004

Posts: 973

intercodes

Send a message via Yahoo to intercodes
Default

Yup, the above program is pass by value. If you want to make a 'pass by refernce call'' pass the address of variable 'i' and 'j' [ foo(&i,&j) ] and the arguments in the function should be declared as pointers [ void foo{int *x,int *y) ] and manipulate the variables inside the function 'foo' accordingly.

Sign
Intercodes
intercodes is offline