|
||||||
| C Tutorials All C Tutorials and Code |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
| Sponsored Links |
|
|
|
|||
|
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 | ........ | 1024.41 |
| MeTh0Dz|Reb0rn | ........ | 974.08 |
| morefood2001 | ........ | 850.04 |
| John | ........ | 841.93 |
| WingedPanther | ........ | 661.52 |
| marwex89 | ........ | 575.59 |
| Brandon W | ........ | 449.93 |
| chili5 | ........ | 292.12 |
| orjan | ........ | 187.41 |
| Steve.L | ........ | 181.88 |
Goal: 100,000 Posts
Complete: 79%