메모리 할당에 대한 부분을 보는데.
변수의 주소는 &로 쉽게 출력할수 있는데.
함수의 주소는 어떻게 알아보죠? 디버거로 할수 있는 방법 말고
직접 출력하고 싶은데요.
어떤 방법들이 있을까요?
printf("%x", (unsigned)printf);
printf("%p", printf);
I was using &main as you can see the below
prinf("%p",&main);
am i right?
printf("%p", main); 해도 마찬가지입니다. printf("%p", &&&&&&main); 해도 마찬가지일걸요.
텍스트 포맷에 대한 자세한 정보
<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]
printf("%x",
printf("%x", (unsigned)printf);
printf("%p", printf);
printf("%p", printf);
but how about the main function.
I was using &main as you can see the below
prinf("%p",&main);
am i right?
함수는 & 붙이나 안붙이나 어차피 똑같습니다.
printf("%p", main); 해도 마찬가지입니다.
printf("%p", &&&&&&main); 해도 마찬가지일걸요.
댓글 달기