This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passing reference problem.......I think :confused:

 
Jimmy Bonds
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All-
Check out this code:

When I compiled and ran the code it displayed "6" as the output.
I expected 3 to be displayed
Can anyone explain this?
Thanks!
Jimmy-
------------------
yah, yah, I'm a newbie
[This message has been edited by Jimmy Bonds (edited June 22, 2001).]
 
rani bedi
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your program you are actually not printing the return values from the functions cut and slice.
I have made the changes in ur code.


(edited by Cindy to format code)
[This message has been edited by Cindy Glass (edited June 22, 2001).]
 
rani bedi
Ranch Hand
Posts: 358
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your program you are actually not printing the return values from the functions cut and slice.
I have made the changes in ur code.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic