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

#define MAX(x,y) (x) > (y) ? (x) : (y)
main()
{
int i = 10, j = 5, k = 0;
k = MAX(i++, ++j);
printf("%d %d %d", i,j,k);
}

what will the values of i , j and k?
}

Answer Posted / jason

The answer is undefined. It is undefined in C to use the
increment operator more than once in the same expression.

MAX(i++, ++j) expands to:

(i++) > (++j) ? (i++) : (++j)

Which guarantees that either i++ or ++j appears twice in the
expression.

http://blog.emptycrate.com/node/329

Is This Answer Correct ?    7 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is c is a high level language?

1259


Do you know what are bitwise shift operators in c programming?

1155


C program execution always begins with a) #include b) comment (/*-------*/) c) main() d) declaration instructions

1108


Implement bit Array in C.

1200


What does c mean?

1108


What is data types?

1143


What is malloc calloc and realloc in c?

1432


What are the types of variables in c?

1089


What is file in c preprocessor?

1199


How is = symbol different from == symbol in c programming?

1107


how can I convert a string to a number?

1141


What is exit() function?

1075


program to convert a integer to string in c language'

2509


What is the difference between the expression “++a” and “a++”?

1276


What is the difference between if else and switchstatement

2008