Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 12-01-2005, 11:55 AM   #11 (permalink)
 
Super Techie

Join Date: Jun 2005

Posts: 274

mgoldb2

Default

Quote:
q=j++ + ++j + j++;
printf("%d %d",q,j);
getch();
clrscr();
q=j++ + ++j + ++j;
printf("%d %d",q,j);
getch();
}
ok we all agree that j=4 after the first equation

q=j++ + ++j + ++j but the computer really only do one operation at a time so this is the same as
q=j++ + ++j
q=q + ++j
the first one is 4+5=9 and j=6
secound one is 9+7=16


mgoldb2 is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On