Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- Android
- error
- 다윈
- LAYER_TYPE_SOFTWARE
- porterduff
- Hyperledger
- Exception
- quick-start
- C
- convert
- Realm
- vuepress
- fabric-sdk-java
- 컴파일
- hardwareacceleration
- firebase
- test
- null safety
- bigquery
- kotlin
- web3js
- 스트리밍
- log
- Gradle
- ethereum
- coroutines
- Glide
- 안드로이드
- fabic
- dataginding
Archives
- Today
- Total
날마다 새롭게 또 날마다 새롭게
atoi - 입력된 문자를 정수로 변환하는 함수 구현 코드 본문
#include <ctype.h>
/* atoi : convert s to integer */
int atoi( char s[])
{
int i, n, sign;
for(i=0;isspace(s[i]); i++)
;
sign = (s[i]=='-')?-1:1;
if(s[i]=='+' || s[i] == '-')
i++;
for(n=0;isdigit(s[i]);i++)
n=10*n+(s[i] - '0');
return sign * n;
}
Comments