일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 선형모델
- Linear Regression
- call by reference
- MapReduce
- inheritance
- Effective C++
- 지도학습
- 회귀
- 비선형모델
- overriding
- kubernetes
- c++
- 회귀학습
- Class
- local minimum
- 맵리듀스
- Machine learning
- member function
- 최소제곱법
- Nonlinear Model
- regression
- 머신러닝
- virtual function
- struct
- Overloading
- 딥러닝
- least square
- call by value
- 비선형 함수
- Nonlinear Function
- Today
- Total
J's Study log
[C] Integer 본문
Overflow
Overflow occurs if the input number is greater than the storage range of type
1
2
3
4
5
6
7
8
9
|
#include <stdio.h>
int main()
{
int n = 2147483638;
for(int i =1; i <= 20; i++)
printf("%d\n", n++);
}
|
Result : 2147483638
2147483639
2147483640
2147483641
2147483642
2147483643
2147483644
2147483645
2147483646
2147483647
-2147483648
-2147483647
-2147483646
-2147483645
-2147483644
-2147483643
-2147483642
-2147483641
-2147483640
-2147483639
The storage range of 'int' is (-2147483648~2147483647).
While compiling loop in line7 'n' overflows, so the value resets into minimun number.
'Computer Language > C' 카테고리의 다른 글
[C] Pointer (0) | 2020.04.28 |
---|---|
[C] Structure Pointer (0) | 2020.02.08 |
[C] Data Type (0) | 2019.12.01 |
[C] Format specifier (0) | 2019.12.01 |
[C] Operator Priority (0) | 2019.12.01 |