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

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

875


Discuss the concept of yagni and explain something you did recently that adhered to this practice.

776


How are local and global variables are allocated by compiler.

865


What is solid?

849


Mention what are buses used for communication in embedded system?

850


Can a pointer be volatile ?

989


Tell me when one must use recursion function? Mention what happens when recursion functions are declared inline?

879


Explain what are the differences between analytical and computational modeling?

874


Tell me can a pointer be volatile?

866


Can you please explain the difference between mutexes vs semaphores?

820


What are the qualifiers in c?

811


Whose blogs or podcasts do you follow? Do you blog or podcast?

737


Do you know what is the use of volatile keyword?

828


What are the commonly found errors in embedded systems?

799


What is interrupt latency? How can you reduce it?

808