• 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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic