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

look at following code

void foo(void) {
unsigned int a = 6;
int b = -20;
int c = (a+b > 6) ? 1:0;
}
o/p is 1 why
explain promotion rules

Answer Posted / nitin sharma

Compiler will convert variable b to unsigned int b and then do the addition. Which will be greater than 6 and you got 1.

Is This Answer Correct ?    38 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between using a macro and inline function?

829


How do you learn about the latest technology trends?

737


How does combination of functions reduce memory requirements in embedded systems?

864


What is the task of the pre-processor?

853


What elements of oo design are most prone to abuse? How would you mitigate that?

919


What is a 'const' variable?

830


What is return type of isr?

752


Tell me can a variable be both const and volatile?

822


Can structures be passed to the functions by value?

810


How does input/output bus functions?

776


Tell me about 3 times you failed.

939


Can you name any code testing tools?

873


Why is model transformations used in the embedded system?

757


List out various uses of timers in embedded system?

820


How to create a child process in linux?

977