Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
C
swapping values
swapping values
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
Sinjanv
New Member
Join Date:
May 2010
Posts:
6
#1
swapping values
May 13 '10, 01:31 PM
how will u swap two values neither using temporary variables nor memory references
Dheeraj Joshi
Recognized Expert
Top Contributor
Join Date:
Jul 2009
Posts:
1129
#2
May 13 '10, 01:38 PM
Have you heard of operations 'AND' 'OR' 'XOR' etc?
Regards
Dheeraj Joshi
Comment
Post
Cancel
Sinjanv
New Member
Join Date:
May 2010
Posts:
6
#3
May 13 '10, 01:41 PM
Originally posted by
dheerajjoshim
Have you heard of operations 'AND' 'OR' 'XOR' etc?
Regards
Dheeraj Joshi
ya but how will u implement 'AND' 'OR' 'XOR' for swapping
Comment
Post
Cancel
Dheeraj Joshi
Recognized Expert
Top Contributor
Join Date:
Jul 2009
Posts:
1129
#4
May 13 '10, 01:44 PM
Please Google and see yourself.
Here is wiki link
Regards
Dheeraj Joshi
Comment
Post
Cancel
Frinavale
Recognized Expert
Expert
Join Date:
Oct 2006
Posts:
9749
#5
May 13 '10, 01:46 PM
You could also consider pushing the values onto the stack and popping them off into the swapped variable. Depends on how low level you're going I guess.
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment