Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in C only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
C
prefix and postfix operators in C
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
annavalliara
New Member
Join Date:
Aug 2013
Posts:
1
#1
prefix and postfix operators in C
Aug 28 '13, 01:43 PM
Code:
int a=5,b; b=++a * a++; printf("a is %d" ,a); printf("b is %d" , b);
what is the output here?
what is the value of 'a' in the first and second place in
b = ++a * a++; ?
weaknessforcats
Recognized Expert
Expert
Join Date:
Mar 2007
Posts:
9214
#2
Aug 28 '13, 02:11 PM
No one can tell what the output is.
The rules allow the compiler to obtain the values of variables in any order within a statement. You may think they should go left to right but that's just you.
Do not change the value of a variable more than once in statement.
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment