{"id":983,"date":"2025-04-22T21:09:28","date_gmt":"2025-04-22T12:09:28","guid":{"rendered":"https:\/\/hyandmj.asuscomm.com\/hblog\/?p=983"},"modified":"2025-04-22T21:10:37","modified_gmt":"2025-04-22T12:10:37","slug":"c%ec%96%b8%ec%96%b4-%ec%84%9c%ec%8b%9d-%ec%a7%80%ec%a0%95%ec%9e%90-%ec%b4%9d%ec%a0%95%eb%a6%ac","status":"publish","type":"post","link":"https:\/\/hyandmj.asuscomm.com\/hblog\/?p=983","title":{"rendered":"C\uc5b8\uc5b4 \uc11c\uc2dd \uc9c0\uc815\uc790 \ucd1d\uc815\ub9ac"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Motivation<\/h2>\n\n\n\n<p><code>printf<\/code>\ub97c \ud560 \ub54c\ub098, CERN ROOT\uc5d0\uc11c <code>TString<\/code>\uc758 <code>Form<\/code>\uc744 \uc0ac\uc6a9\ud560 \ub54c \ub298 \uc11c\uc2dd \uc9c0\uc815\uc790\ub97c \ubb58 \uc368\uc57c \ud558\ub098 \ud5f7\uac08\ub824\uc11c \uc5ec\uae30\uc5d0 \uc815\ub9ac\ud574 \ub460.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\uc11c\uc2dd \uc9c0\uc815\uc790 (Format Specifier)<\/h2>\n\n\n\n<p>\uc11c\uc2dd \uc9c0\uc815\uc790\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \uc0ac\uc6a9:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>%&#91;\ud50c\ub798\uadf8]&#91;\ub113\uc774]&#91;.(\uc815\ubc00\ub3c4)]&#91;\uae38\uc774]\uc11c\uc2dd\uc9c0\uc815\uc790<\/code><\/pre>\n\n\n\n<p>\uc11c\uc2dd \uc9c0\uc815\uc790\uc758 \uc885\ub958\ub294 \ub2e4\uc74c\uacfc \uac19\uc74c:<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table class=\"has-fixed-layout\"><tbody><tr><td>\uc11c\uc2dd \uc9c0\uc815\uc790<\/td><td>\uc790\ub8cc\ud615<\/td><td>\uc758\ubbf8\ubbf8<\/td><\/tr><tr><td><code>%c<\/code><\/td><td><code>char<\/code><\/td><td>\ubb38\uc790<\/td><\/tr><tr><td><code>%s<\/code><\/td><td><code>char*<\/code>, <code>char[]<\/code><\/td><td>\ubb38\uc790\uc5f4<\/td><\/tr><tr><td><code>%hd<\/code> or <code>%hi<\/code><\/td><td><code>short int<\/code><\/td><td>\ubd80\ud638 \ud3ec\ud568 2 bytes \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%d<\/code> or <code>%i<\/code><\/td><td><code>int<\/code><\/td><td>\ubd80\ud638 \ud3ec\ud568 <code>int<\/code> \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%ld<\/code> or <code>%li<\/code><\/td><td><code>long int<\/code><\/td><td>\ubd80\ud638 \ud3ec\ud568 <code>long<\/code> \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%lld<\/code> or <code>%lli<\/code><\/td><td><code>long long int<\/code><\/td><td>\ubd80\ud638 \ud3ec\ud568 8 bytes \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%hu<\/code><\/td><td><code>unsigned short int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 2 bytes \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%u<\/code><\/td><td><code>unsigned int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>int<\/code> \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%lu<\/code><\/td><td><code>unsigned long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>long<\/code> \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%llu<\/code><\/td><td><code>unsigned long long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 8 bytes \ud06c\uae30 \uc815\uc218<\/td><\/tr><tr><td><code>%ho<\/code><\/td><td><code>unsigned short int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 2 bytes \ud06c\uae30 \uc815\uc218 (8\uc9c4\uc218)<\/td><\/tr><tr><td><code>%o<\/code><\/td><td><code>unsigned int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>int<\/code> \ud06c\uae30 \uc815\uc218 (8\uc9c4\uc218)<\/td><\/tr><tr><td><code>%lo<\/code><\/td><td><code>unsigned long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>long<\/code> \ud06c\uae30 \uc815\uc218 (8\uc9c4\uc218)<\/td><\/tr><tr><td><code>%llo<\/code><\/td><td><code>unsigned long long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 8 bytes \ud06c\uae30 \uc815\uc218 (8\uc9c4\uc218)<\/td><\/tr><tr><td><code>%hx<\/code><\/td><td><code>unsigned short int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 2 bytes \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218)<\/td><\/tr><tr><td><code>%x<\/code><\/td><td><code>unsigned int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>int<\/code> \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218)<\/td><\/tr><tr><td><code>%lx<\/code><\/td><td><code>unsigned long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>long<\/code> \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218)<\/td><\/tr><tr><td><code>%llx<\/code><\/td><td><code>unsigned long long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 8 bytes \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218)<\/td><\/tr><tr><td><code>%hX<\/code><\/td><td><code>unsigned short int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 2 bytes \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218, \ub300\ubb38\uc790\ub85c)<\/td><\/tr><tr><td><code>%X<\/code><\/td><td><code>unsigned int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>int<\/code> \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218, \ub300\ubb38\uc790\ub85c)<\/td><\/tr><tr><td><code>%lX<\/code><\/td><td><code>unsigned long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 <code>long<\/code> \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218, \ub300\ubb38\uc790\ub85c)<\/td><\/tr><tr><td><code>%llX<\/code><\/td><td><code>unsigned long long int<\/code><\/td><td>\ubd80\ud638 \ubbf8\ud3ec\ud568 8 bytes \ud06c\uae30 \uc815\uc218 (16\uc9c4\uc218, \ub300\ubb38\uc790\ub85c)<\/td><\/tr><tr><td><code>%f<\/code><\/td><td><code>float<\/code><\/td><td>\uc18c\uc218\uc810 \ud45c\uae30 4 bytes \ud06c\uae30 \uc2e4\uc218<\/td><\/tr><tr><td><code>%lf<\/code><\/td><td><code>double<\/code><\/td><td>\uc18c\uc218\uc810 \ud45c\uae30 8 bytes \ud06c\uae30 \uc2e4\uc218<\/td><\/tr><tr><td><code>%llf<\/code> or <code>%Lf<\/code><\/td><td><code>long double<\/code><\/td><td>\uc18c\uc218\uc810 \ud45c\uae30 <code>long double<\/code> \ud06c\uae30 \uc2e4\uc218<\/td><\/tr><tr><td><code>%e<\/code><\/td><td><code>float<\/code><\/td><td>\uc9c0\uc218 \ud45c\uae30 4 bytes \ud06c\uae30 \uc2e4\uc218<\/td><\/tr><tr><td><code>%le<\/code><\/td><td><code>double<\/code><\/td><td>\uc9c0\uc218 \ud45c\uae30 8 bytes \ud06c\uae30 \uc2e4\uc218<\/td><\/tr><tr><td><code>%Le<\/code><\/td><td><code>long double<\/code><\/td><td>\uc9c0\uc218 \ud45c\uae30 <code>long double<\/code> \ud06c\uae30 \uc2e4\uc218<\/td><\/tr><tr><td><code>%E<\/code><\/td><td><code>float<\/code><\/td><td>\uc9c0\uc218 \ud45c\uae30 4 bytes \ud06c\uae30 \uc2e4\uc218 (\ub300\ubb38\uc790 E)<\/td><\/tr><tr><td><code>%lE<\/code><\/td><td><code>double<\/code><\/td><td>\uc9c0\uc218 \ud45c\uae30 8 bytes \ud06c\uae30 \uc2e4\uc218 (\ub300\ubb38\uc790 E)<\/td><\/tr><tr><td><code>%LE<\/code><\/td><td><code>long double<\/code><\/td><td>\uc9c0\uc218 \ud45c\uae30 <code>long double<\/code> \ud06c\uae30 \uc2e4\uc218 (\ub300\ubb38\uc790 E)<\/td><\/tr><tr><td><code>%g<\/code><\/td><td><code>float<\/code><\/td><td><code>%f<\/code>\uc640 <code>%e<\/code> \uc911\uc5d0 \uc9e7\uc740 \uac70<\/td><\/tr><tr><td><code>%lg<\/code><\/td><td><code>double<\/code><\/td><td><code>%lf<\/code>\uc640 <code>%le<\/code> \uc911\uc5d0 \uc9e7\uc740 \uac70<\/td><\/tr><tr><td><code>%Lg<\/code><\/td><td><code>long double<\/code><\/td><td><code>%Lf<\/code>\uc640 <code>%Le<\/code> \uc911\uc5d0 \uc9e7\uc740 \uac70<\/td><\/tr><tr><td><code>%G<\/code><\/td><td><code>float<\/code><\/td><td><code>%f<\/code>\uc640 <code>%e<\/code> \uc911\uc5d0 \uc9e7\uc740 \uac70 (\ub300\ubb38\uc790 E)<\/td><\/tr><tr><td><code>%lg<\/code><\/td><td><code>double<\/code><\/td><td><code>%lf<\/code>\uc640 <code>%le<\/code> \uc911\uc5d0 \uc9e7\uc740 \uac70 (\ub300\ubb38\uc790 E)<\/td><\/tr><tr><td><code>%Lg<\/code><\/td><td><code>long double<\/code><\/td><td><code>%Lf<\/code>\uc640 <code>%Le<\/code> \uc911\uc5d0 \uc9e7\uc740 \uac70 (\ub300\ubb38\uc790 E)<\/td><\/tr><\/tbody><\/table><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Motivation printf\ub97c \ud560 \ub54c\ub098, CERN ROOT\uc5d0\uc11c TString\uc758 Form\uc744 \uc0ac\uc6a9\ud560 \ub54c \ub298 \uc11c\uc2dd \uc9c0\uc815\uc790\ub97c \ubb58 \uc368\uc57c \ud558\ub098 \ud5f7\uac08\ub824\uc11c \uc5ec\uae30\uc5d0 \uc815\ub9ac\ud574 \ub460. \uc11c\uc2dd \uc9c0\uc815\uc790 (Format Specifier) \uc11c\uc2dd \uc9c0\uc815\uc790\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \ud615\uc2dd\uc73c\ub85c \uc0ac\uc6a9: \uc11c\uc2dd \uc9c0\uc815\uc790\uc758 \uc885\ub958\ub294 \ub2e4\uc74c\uacfc \uac19\uc74c: \uc11c\uc2dd \uc9c0\uc815\uc790 \uc790\ub8cc\ud615 \uc758\ubbf8\ubbf8 %c char \ubb38\uc790 %s char*, char[] \ubb38\uc790\uc5f4 %hd or %hi short [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-983","post","type-post","status-publish","format-standard","hentry","category-computer-language"],"_links":{"self":[{"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=\/wp\/v2\/posts\/983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=983"}],"version-history":[{"count":4,"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=\/wp\/v2\/posts\/983\/revisions"}],"predecessor-version":[{"id":987,"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=\/wp\/v2\/posts\/983\/revisions\/987"}],"wp:attachment":[{"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hyandmj.asuscomm.com\/hblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}