dec2bin 함수의 일부인데요 arr0부터 arr4까지 0으로 모두 초기화한다음에 arr을 리턴했습니다. 하지만 결과는 1070192가 나와요. 왜 00000이 리턴되지 않나요??
- Type Error(Type casting) - Unused argument
int* dec2bin() { const int ARR_SIZ = 5; int *arr = (int*)malloc(sizeof(int)*ARR_SIZ); int i; for (i=0; i<ARR_SIZ; i++) arr[i]=0; return arr; }
리턴한 arr은 포인터네요. 주소값
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
- Type Error(Type casting)-
- Type Error(Type casting)
- Unused argument
리턴한 arr은 포인터네요. 주소값
리턴한 arr은 포인터네요. 주소값
댓글 달기