Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Find the largest number from the given 2 numbers without using
any loops and the conditional operator.

Answers were Sorted based on User's Feedback



Find the largest number from the given 2 numbers without using any loops and the conditional opera..

Answer / surya

if(!(a/b)) // if a is less than b then division result will be zero.
02
{
03
cout << " b is greater than a";
04
}
05
else if (!(a-b)) // we know a is greater than or equal to b now. check whether they are equal.
06
{
07
cout << "a and b are equal";
08
}
09
else
10
cout << "a is greater than b";

Is This Answer Correct ?    9 Yes 6 No

Find the largest number from the given 2 numbers without using any loops and the conditional opera..

Answer / anji

We can compare two
values using unary
operators also

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What is %s and %d in c?

0 Answers  


What are shell structures used for?

0 Answers  


Is this program statement valid? INT = 10.50;

0 Answers  


Q. where is the below variables stored ? - volatile, static, register

3 Answers   Bosch,


Explain zero based addressing.

0 Answers  


Is c weakly typed?

0 Answers  


Why is not a pointer null after calling free?

0 Answers  


The __________ attribute is used to announce variables based on definitions of columns in a table?

0 Answers  


What does 3 mean in texting?

0 Answers  


write an algorithm to display a square matrix.

0 Answers  


What is the most efficient way to count the number of bits which are set in a value?

4 Answers  


What is linear search?

0 Answers  


Categories