|
||||||
| C Tutorials All C Tutorials and Code |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||
|
I like it....thinking outside the box
|
|
|||
|
Quote:
What behavior is undefined? What would you say is a smarter way to do it?
__________________
________________________________________________ "I'm not young enough to know everything." - Oscar Wilde |
| Sponsored Links |
|
|
|
|||
|
When signed arithmetic over/underflows, the behavior is undefined.
The obvious way, using a temporary. |
|
|||
|
Ah, I get it.
How about unsigned behaviour on overflow? Always wrap or is it also undefined?
__________________
________________________________________________ "I'm not young enough to know everything." - Oscar Wilde |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
| Xav | ........ | 1322.18 |
| MeTh0Dz|Reb0rn | ........ | 1053.7 |
| morefood2001 | ........ | 879.43 |
| John | ........ | 877.37 |
| marwex89 | ........ | 869.98 |
| WingedPanther | ........ | 830.24 |
| Brandon W | ........ | 735.07 |
| chili5 | ........ | 309.39 |
| Steve.L | ........ | 236.23 |
| dcs | ........ | 216.02 |
Goal: 100,000 Posts
Complete: 82%