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

main()
{ int i;
printf("%d",((i=1)*i-- - --i*(i=-3)*i++ + ++i));

}

ans is 24 bt how?pls tell smbody............

Answer Posted / sureshb

value is 26 and i value is -2.

Intiallay i=1 is assiged.

((i=1)*i--) 1st expression = 1 postfix decrement evaluates at the end.
now i=1
--i => 0. 2nd expression

i=-3 assigned new value 3rd expression.

-3*-3 => 9 *(-3) => -27

++ post increment done at the end

-(-27) = 27.

1+ 27 =>28
now i is -3.
++i => -2;
28-2= 26.

i=-2;
post increment and decrement happens. finaaly i = -2.

Is This Answer Correct ?    5 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When should I declare a function?

1138


Explain what are global variables and explain how do you declare them?

1175


Explain Basic concepts of C language?

1162


How many types of arrays are there in c?

1049


diff between exptected result and requirement?

2062


What are formal parameters?

1126


What is file in c preprocessor?

1155


What does the message "automatic aggregate intialization is an ansi feature" mean?

1190


The program will first compute the tax you owe based on your income. User is prompted to enter income. Program will compute the total amount of tax owed based on the following: Income Tax 0 - $45,000 = 0.15 x income $45,001 - $90,000 = 6750 + 0.20 x (income – 45000) $90,001 - $140,000 = 15750 + 0.26 x (income – 90000) $140,001 - $200,000 = 28750 + 0.29 x (income – 140000) Greater than $200,000 = 46150 + 0.33 x (income – 200000) Dollar amounts should be in dollars and cents (float point numbers with two decimals shown). Tax is displayed on the screen.

1639


How do you view the path?

1132


What is the function of multilevel pointer in c?

1087


What is a far pointer in c?

1047


What is the meaning of && in c?

1024


Hai,I have done with my bachelor of commerce and planing to ms,please suggest me how to convince vo for shifting from commerce to computers. Visa on 8 DEC 2014  Npu university

2044


Calculate the weighted average of a list of n numbers using the formula xavg = f1x1+f2x2+ ….+ fnxn where the f’s are fractional weighting factors, i.e., 0<=fi<1, and f1+f2+….+fn = 1

4281