944,164 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 968
  • C RSS
Jul 6th, 2006
0

help for c program

Expand Post »
i kow c up to a good level but i have question for which i am anable to find solution that is to find greatest of 2 numbers in 'c' without using 'if' condition can any one help me out
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
chillharsh is offline Offline
4 posts
since Jul 2006
Jul 6th, 2006
0

Re: help for c program

Ternary operator perhaps ?

  1. int a = 1;
  2. int b = 2;
  3.  
  4. int c = ((a > b) ? a : b )
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Jul 6th, 2006
0

Re: help for c program

thanks
Reputation Points: 10
Solved Threads: 0
Newbie Poster
chillharsh is offline Offline
4 posts
since Jul 2006
Jul 7th, 2006
0

Re: help for c program

Is there any other way (I mean using bitwise operators) ???
Reputation Points: 16
Solved Threads: 3
Junior Poster in Training
dilip.mathews is offline Offline
89 posts
since Jun 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: 32 BIt Flat Real mode
Next Thread in C Forum Timeline: Getting file stats in C





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC