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

An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above

1164


Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?

1499


Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?

1087


What does do in c?

1040


Explain what is operator promotion?

1086


How important is structure in life?

1082


What is getch c?

1298


Explain what is a 'locale'?

1080


Explain the Difference between the New and Malloc keyword.

1128


Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?

1047


What is structure and union in c?

1144


Explain how do you override a defined macro?

1075


Can one function call another?

1112


Tell me about low level programming languages.

1124


Stimulate calculator using Switch-case-default statement for two numbers

2987