By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,818 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,818 IT Pros & Developers. It's quick & easy.

Write an equivalent statement

P: 10
Can someone please help me? Everytime I get something and go to check it it doesnt work.

Consider:
int a=1, b=2, c=3
a += b += c += 7

Write an equivilant expression that is fully parenthesized. What are the values of the variables a, b, and c? Write down the answer and then write a test program to check it.
Nov 10 '06 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 1,510
Can someone please help me? Everytime I get something and go to check it it doesnt work.

Consider:
int a=1, b=2, c=3
a += b += c += 7

Write an equivilant expression that is fully parenthesized. What are the values of the variables a, b, and c? Write down the answer and then write a test program to check it.
what results do you get? post your code.
Nov 10 '06 #2

momotaro
100+
P: 357
Hint! a+=b <=> a=a+b ;) good luck!
Nov 11 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.