{"id":9710,"date":"2011-06-02T08:15:00","date_gmt":"2011-06-02T08:15:00","guid":{"rendered":"http:\/\/melotopia.net\/b\/?p=9710"},"modified":"2011-06-02T08:15:00","modified_gmt":"2011-06-02T08:15:00","slug":"%ed%95%a8%ec%88%98%ec%9d%98-%ec%a4%91%ec%b2%a9-%ec%a0%95%ec%9d%98","status":"publish","type":"post","link":"http:\/\/melotopia.net\/b\/?p=9710","title":{"rendered":"\ud568\uc218\uc758 \uc911\ucca9 \uc815\uc758"},"content":{"rendered":"<div class=\"desc\">\n        C\uc5b8\uc5b4\uc5d0\uc11c\ub294 \ud568\uc218\ub97c \uc911\ucca9 \uc815\uc758\ud558\ub294 \uac83\uc744 \ud5c8\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n<p>        \uc608\ub97c\ub4e4\uc5b4, C\uc5b8\uc5b4\uc5d0\uc11c \ub2e4\uc74c\uacfc \uac19\uc740 \ud568\uc218\ub97c \uc0dd\uac01\ud574 \ubcf4\uc790.<\/p>\n<div class=\"txc-textbox\" style=\"border-style: solid; border-width: 1px; border-color: rgb(231, 253, 181); background-color: rgb(231, 253, 181); padding: 10px;\">\n         #include<stdio.h><\/p>\n<p>         int test(int a){<br \/>\n         <br \/>\n         printf(&#8220;a &#8220;);<br \/>\n         <br \/>\n         int nested_test(int b){<br \/>\n         <br \/>\n         printf(&#8220;nested&#8221;);<br \/>\n         <br \/>\n         return 1;<br \/>\n         <br \/>\n         }<br \/>\n         <br \/>\n         return nested_test(1);<br \/>\n         <br \/>\n         }<\/p>\n<p>         int main(){<br \/>\n         <br \/>\n         test(0);<br \/>\n         <br \/>\n         return 1;<br \/>\n         <br \/>\n         }\n        <\/div>\n<p>\n        test\ud568\uc218 \uc548\uc5d0 nested_test\ud568\uc218\uac00 \ub610 \uc815\uc758\ub418\uc5b4 \uc788\ub2e4. C\uc5b8\uc5b4 \ud45c\uc900\uc5d0\uc11c\ub294 \uc774\ub7f0 \ud568\uc218 \uc815\uc758\ub97c \ud5c8\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4. \uadf8\ub7ec\ub098 GCC\uc758 C\ucef4\ud30c\uc77c\ub7ec\uc5d0\uc11c\ub294 \ud5c8\uc6a9\ud55c\ub2e4. \uc704\uc758 \ud504\ub85c\uadf8\ub7a8\uc744 \uc2e4\ud589\uc2dc\ud0a4\uba74 a\uc640 nested\uac00 \ub458 \ub2e4 \ub098\ud0c0\ub09c\ub2e4.<br \/>\n        <\/p>\n<div class=\"txc-textbox\" style=\"border-style: solid; border-width: 1px; border-color: rgb(254, 254, 184); background-color: rgb(254, 254, 184); padding: 10px;\">\n<br \/>\n         def test(a,b):<br \/>\n         <br \/>\n         print(a)<br \/>\n         <br \/>\n         print(b)<br \/>\n         <br \/>\n         def test1(a,b):<br \/>\n         <br \/>\n         print(a+b)<\/p>\n<p>         test1(a,b)<br \/>\n         <br \/>\n         test(1,2)<br \/>\n         <br \/>\n         test1(1,2) # ERROR!!\n        <\/div>\n<p>\n        \ud30c\uc774\uc36c\uc5d0\uc11c\ub3c4 \uac19\uc740 \uc77c\uc774 \uac00\ub2a5\ud558\ub2e4. \ud30c\uc774\uc36c\uc5d0\uc11c\ub294 \uc911\ucca9 \uc815\uc758\ub97c \uc6d0\ub798\ubd80\ud130 \ud5c8\uc6a9\ud55c\ub2e4. \ubb3c\ub860, test\ud568\uc218\uc758 \ubc14\uae65\ucabd\uc5d0\uc11c test1\uc744 \ubd88\ub7ec\uc624\ub824\uace0 \ud558\uba74 \uc624\ub958\uac00 \ubc1c\uc0dd\ud55c\ub2e4. \ubc16\uc5d0\uc11c\ub294 test1\uc774 \uc548 \ubcf4\uc774\uae30 \ub54c\ubb38\uc774\ub2e4. (Scope \ubb38\uc81c)<\/p>\n<p>        C\uc5b8\uc5b4\uc5d0 GCC\ub97c \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0\uc5d0, \ud568\uc218\ud3ec\uc778\ud130\ub97c \uc5f0\uacb0\ud574\uc11c \ud568\uc218 \ub0b4\ubd80\uc5d0 \uc911\ucca9 \uc815\uc758\ub41c \ud568\uc218\ub97c \ubd88\ub7ec\uc624\ub294 \uac83\uc774 \uac00\ub2a5\uc740 \ud558\ub2e4. \ub2e8, \uac00\ub2a5\ud558\ub2e4\uace0 \ud574\uc11c \ud574\ub3c4 \ub41c\ub2e4\ub294 \ub73b\uc740 \uc544\ub2c8\ub2e4. \ud568\uc218\ub294 \ud638\ucd9c\ub418\ub294 \uc21c\uac04\uc5d0 \uc5f0\uacb0\ub418\uc5c8\ub2e4\uac00 \ub05d\ub098\ub294 \uc21c\uac04 \ubaa8\ub4e0 \uc791\ub3d9\uc744 \uc815\uc9c0\ud558\ubbc0\ub85c \ub9cc\uc57d \uc911\ucca9 \uc815\uc758\ub41c \ud568\uc218\uac00 \ud568\uc218\uc758 \uc678\ubd80\uc5d0\uc11c \ud638\ucd9c\ub418\uc5c8\uc744 \ub54c \ubaa8\ub4e0 \uc77c\uc744 \ub9c8\ubb34\ub9ac\uc9d3\uae30 \uc804\uc5d0 \ubc14\uae65\ucabd\uc758 \ud568\uc218\uac00 \ub05d\ub098\ubc84\ub9b0\ub2e4\uba74, \uc77c\uc774 \ub9c8\ubb34\ub9ac\ub418\uae30 \uc804\uc5d0 \uc885\ub8cc\ub418\uc5b4 \uc624\ub958\ub97c \ubc1c\uc0dd\uc2dc\ud0ac \uac83\uc774\ub2e4. (\uc548\ud574\ubd24\uc74c&#8230;)<\/p>\n<p><a href=\"http:\/\/langdev.org\/posts\/38\" target=\"_blank\" title=\"[http:\/\/langdev.org\/posts\/38]\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.\"><br \/>\n         http:\/\/langdev.org\/posts\/38<br \/>\n        <\/a><br \/>\n<br \/>\n<a href=\"http:\/\/sparrow.borlandforum.com\/board\/boardview.asp?table_name=tip&#038;sel=&#038;findit=&#038;srch=&#038;gotopage=7&#038;block=0&#038;board_idx=115&#038;path=N&#038;vir_numm=170&#038;vir_numm2=65\" target=\"_blank\" title=\"[http:\/\/sparrow.borlandforum.com\/board\/boardview.asp?table_name=tip&#038;sel=&#038;findit=&#038;srch=&#038;gotopage=7&#038;block=0&#038;board_idx=115&#038;path=N&#038;vir_numm=170&#038;vir_numm2=65]\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.\"><br \/>\n         http:\/\/sparrow.borlandforum.com\/board\/boardview.asp?table_name=tip&#038;sel=&#038;findit=&#038;srch=&#038;gotopage=7&#038;block=0&#038;board_idx=115&#038;path=N&#038;vir_numm=170&#038;vir_numm2=65<br \/>\n        <\/a><br \/>\n<br \/>\n<a href=\"http:\/\/discuss.joelonsoftware.com\/default.asp?interview.11.431470.11\" target=\"_blank\" title=\"[http:\/\/discuss.joelonsoftware.com\/default.asp?interview.11.431470.11]\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.\"><br \/>\n         http:\/\/discuss.joelonsoftware.com\/default.asp?interview.11.431470.11<br \/>\n        <\/a><br \/>\n<br \/>\n<a href=\"http:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Nested-Functions.html\" target=\"_blank\" title=\"[http:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Nested-Functions.html]\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.\"><br \/>\n         http:\/\/gcc.gnu.org\/onlinedocs\/gcc\/Nested-Functions.html<br \/>\n        <\/a><br \/>\n<br \/>\n<a href=\"http:\/\/en.wikipedia.org\/wiki\/Nested_function\" target=\"_blank\" title=\"[http:\/\/en.wikipedia.org\/wiki\/Nested_function]\ub85c \uc774\ub3d9\ud569\ub2c8\ub2e4.\"><br \/>\n         http:\/\/en.wikipedia.org\/wiki\/Nested_function<br \/>\n        <\/a><br \/>\n<\/p>\n<div style=\"width:100%;margin-top:30px;clear:both;height:30px\">\n<div style=\"width:31px;float:left;\">\n<a href=\"\/toolbar\/popup\/abuseReport\/?entryId=2541\" onclick=\"window.open(this.href, 'tistoryThisBlogPopup', 'width=550, height=510, toolbar=no, menubar=no, status=no, scrollbars=no'); return false;\"><br \/>\n<img data-recalc-dims=\"1\" decoding=\"async\" alt=\"\uc2e0\uace0\" src=\"https:\/\/i0.wp.com\/t1.daumcdn.net\/tistory_admin\/static\/ico\/ico_spam_report.png\" style=\"border:0\"\/><br \/>\n<\/a>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>C\uc5b8\uc5b4\uc5d0\uc11c\ub294 \ud568\uc218\ub97c \uc911\ucca9 \uc815\uc758\ud558\ub294 \uac83\uc744 \ud5c8\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4. \uc608\ub97c\ub4e4\uc5b4, C\uc5b8\uc5b4\uc5d0\uc11c \ub2e4\uc74c\uacfc \uac19\uc740 \ud568\uc218\ub97c \uc0dd\uac01\ud574 \ubcf4\uc790. #include int test(int a){ printf(&#8220;a &#8220;); int nested_test(int b){ printf(&#8220;nested&#8221;); return 1; } return nested_test(1); } int main(){ test(0); return 1; } test\ud568\uc218 \uc548\uc5d0 nested_test\ud568\uc218\uac00 \ub610 \uc815\uc758\ub418\uc5b4 \uc788\ub2e4. C\uc5b8\uc5b4 \ud45c\uc900\uc5d0\uc11c\ub294 \uc774\ub7f0 \ud568\uc218 \uc815\uc758\ub97c \ud5c8\uc6a9\ud558\uc9c0 \uc54a\ub294\ub2e4. \uadf8\ub7ec\ub098 GCC\uc758 C\ucef4\ud30c\uc77c\ub7ec\uc5d0\uc11c\ub294 \ud5c8\uc6a9\ud55c\ub2e4. \uc704\uc758 \ud504\ub85c\uadf8\ub7a8\uc744 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[],"class_list":["post-9710","post","type-post","status-publish","format-standard","hentry","category-12"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8o6gA-2wC","jetpack-related-posts":[],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/9710","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9710"}],"version-history":[{"count":0,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=\/wp\/v2\/posts\/9710\/revisions"}],"wp:attachment":[{"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9710"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/melotopia.net\/b\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}