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

Why would you choose java in embedded systems?

884


What is endianness of a system and how do different systems communicate with each other?

862


Have you developed software testing procedures for new systems and performed qa, quality assurance, or audits?

823


What are the differences between analytical and computational modeling?

920


Why is the single responsibility principle important?

933


What is the difference between asynchrony and concurrency?

1031


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

987


Differentiate between mutexes vs semaphores.

924


Explain what is the need for an infinite loop in embedded systems?

893


Can you name any code testing tools?

942


Explain me what is the main function of multiplexed address/data bus?

838


Do you know what is priority inheritance?

904


What do you do when you get stuck with a problem you can't solve?

830


What happens when recursive functions are declared inline?

972


Explain me how does the interrupt architecture works?

910