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

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

865


Explain the software analysis process, such as code analysis, code metrics, and system risk analysis or software reliability.

983


How does combination of functions reduce memory reuirement in embedded system?

850


Describe a time when you collaborated with designers and engineers to deploy a new product. What was your role?

860


When do you know your code is ready for production?

960


Which parameters decide the size of data type for a processor?

914


How are macros different from inline functions?

955


What's risc architecture?

913


Tell me what is interaction semantics used in embedded systems?

1000


What buses are used for communication in embedded system?

896


What are the different types of embedded systems?

891


Implement a using on .

883


Given time, cost, client satisfaction and best practices, how will you prioritize them for a project you are working on? Explain why.

947


What is inversion of control? How does that relate to dependency injection?

947


How does the interrupts handle by using the threads?

989