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...

Write a C program to find the smallest of three integers,
without using any of the comparision operators.

Answer Posted / srinivas

#include <stdio.h>

int main(void)
{
int a = 10, b = 2, c = 30, result;

result = a < b ? ((a < c) ? a: c) : ((b < c) ? b : c);
printf("%d\n",result);
return 0;


}

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can 'this' pointer by used in the constructor?

1043


Write a client and server program in C language using UDP, where client program interact with the Server as given below: i) The client begins by sending a request to send a string of 8 characters or series of 7 numbers, the server sends back a characters or numbers as per the request of the client. ii) In case of series of 7 numbers: The client sends a multiplication of numbers, to the server. iii) In case of a string of 8 characters: The client sends a reverse order of string to the server.. iv) Server will send an acknowledgment to the client after receiving the correct answer

4303


What are the disadvantages of c language?

1119


What is wild pointer in c with example?

1017


Explain how does free() know explain how much memory to release?

1009


count = 0; for (i = 1;i < = 10; i++);count = count + i; Value of count after execution of the above statements will be a) 0 b) 11 c) 55 d) array

1037


Explain how can I make sure that my program is the only one accessing a file?

1164


How #define works?

1048


Which is more efficient, a switch statement or an if else chain?

968


How can I find out if there are characters available for reading?

1054


Explain continue keyword in c

961


What is a scope resolution operator in c?

1203


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2244


Why main is used in c?

1009


What is the difference between new and malloc functions?

1051