꺄뜨르 2012. 6. 26. 10:34
  1 #include <stdio.h>
  2 #include <stdlib.h>
  3
  4 int main(void)
  5 {
  6 char tmp[500];
  7 char tmp2[500];
  8 char* temp = "%d: %%d";
  9
 10 sprintf(tmp,temp,10,20);
 11 printf("tmp = %s\n",tmp);
 12 sprintf(tmp2,tmp,10,20);
 13 printf("tmp2 = %s\n",tmp2);
 14
 15 }

 

 

결과

tmp = 10: %d
tmp2 = 10: 10