>From: ranjan kumar ojha <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: [c-prog] c objective....
>Date: Wed, 21 Mar 2007 18:36:54 +0000 (GMT)
>
>Hi friends,
>
> look few objective question.....
> #include<iostream>
> using namespace std;
> int main()
> {
> int i=3;
> i += i++ + ++i;
> cout<<i;
> return 0;
> }
>answer = 13
>
>#include<iostream>
> using namespace std;
> int main()
> {
> int i=3;
> i =i+ i++ + ++i;
> cout<<i;
> cin.get();
> return 0;
> }
>answer =11
>
>#include<iostream>
> using namespace std;
> int main()
> {
> int i=3;
> i =i+ (i++ + ++i);
> cout<<i;
> cin.get();
> return 0;
> }
>
>answer = again 13
>
>can any one reveal the concept of i++.
hey hows it going
from what i know of i++ i is not actually incremented until the line of code
has been executed
int i = 4;
int test = 0;
test = i++;
cout << test << endl;//outputs 4 as i was not incremented until
previous line was executed
test = i;
cout << test << endl;//outputs 5
hope this was what u were asking?
>
>
>---------------------------------
> New Yahoo! Mail is the ultimate force in competitive emailing. Find out
>more at the Yahoo! Mail Championships. Plus: play games and win prizes.
>
>[Non-text portions of this message have been removed]
>
_________________________________________________________________
Live Search Maps find all the local information you need, right when you
need it. http://maps.live.com/?icid=hmtag2&FORM=MGAC01
To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/c-prog/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/