ÇÁ·Î±×·¡¹Ö

 3206, 10/161 ȸ¿ø°¡ÀÔ  ·Î±×ÀΠ 
   tegi83
   ¹®ÀÚ¿­ 3°³¸¦ ³ôÀº¼ø¼­´ë·Î ¿¬°áÇÏ´ÂÇÁ·Î±×·¥ÀÔ´Ï´Ù

http://www.hackerschool.org/HS_Boards/zboard.php?id=QNA_programming&no=2052 [º¹»ç]


#include<stdio.h>
#include<string.h>

void concat3(char*,char*,char*,char*);

int main(void)
{
        char str1[50];
        char str2[50];
        char str3[50];
        char constr[150];

        printf("3°³ÀÇ ¹®ÀÚ¿­ ÀÔ·Â:");
        scanf("%s,%s,%s",str1,str2,str3);

        concat3(str1,str2,str3,constr);
        puts(constr);
        return 0;
}

void concat3(char *str1,char *str2,char *str3,char *constr)
{
        if(strcmp(str1,str2)==1)
        {
                if(strcmp(str1,str3)==1)
                {
                        strcpy(constr,str1);
                        if(strcmp(str2,str3)==1)
                        {
                                strcat(constr,str2);
                                strcat(constr,str3);
                        }
                        else
                        {
                                strcat(constr,str3);
                                strcat(constr,str2);
                        }
                }
                else
                {
                        strcpy(constr,str3);
                        if(strcmp(str1,str2)==1){
                                strcat(constr,str1);
                                strcat(constr,str2);
                        }
                        else
                        {
                                strcat(constr,str2);
                                strcat(constr,str1);
                        }
                }
        }
        else
        {
                if(strcmp(str2,str3)==1)
                {
                        strcpy(constr,str2);
                        if(strcmp(str1,str3)==1)
                        {
                                strcat(constr,str1);
                                strcat(constr,str3);
                        }
                        else
                        {
                                strcat(constr,str3);
                                strcat(constr,str1);
                        }
                }
                else
                {
                        strcpy(constr,str3);
                        if(strcmp(str1,str2)==1)
                        {
                                strcat(constr,str1);
                                strcat(constr,str2);
                        }
                        else
                        {
                                strcat(constr,str2);
                                strcat(constr,str1);
                        }
                }
        }
}
¾Æ·¡´Â ¿ö´× À̶ߴµ¥ ¿Ö±×·±Áö;;
±×¸®°í Á¤»óÀûÀ¸·Î µÅÁö¸¦ ¾Ê³×¿ä;;
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(14) : warning C4996: 'scanf': This function or variable may be unsafe. Consider using scanf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\stdio.h(306) : see declaration of 'scanf'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(27) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(30) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(31) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(35) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(36) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(41) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(43) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(44) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(48) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(49) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(57) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(60) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(61) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(65) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(66) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(71) : warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(74) : see declaration of 'strcpy'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(74) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(75) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(79) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>c:\documents and settings\soul\my documents\visual studio 2008\projects\ex1\ex1\ex1.c(80) : warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>        c:\program files\microsoft visual studio 9.0\vc\include\string.h(79) : see declaration of 'strcat'
1>Build log was saved at "file://c:\Documents and Settings\Soul\My Documents\Visual Studio 2008\Projects\ex1\ex1\Debug\BuildLog.htm"
1>ex1 - 0 error(s), 21 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

  Hit : 5488     Date : 2009/06/08 10:06



    
tegi83 Çì´õ ÆÄÀ϶§¹®¿¡ ±×·±°¡;; ÈÉ... 2009/06/08  
md.house ¿ö´×À» Àо¼¼¿ä.
warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS.
2009/06/08  
tegi83 º¸¾È»óÀÇ ¹®Á¦¶§¹®¿¡ ¿ö´×ÀÌ ¶ß´Â°Ç ¾Ë¾Ñ´Âµ¥ ÄÚµùÀº Ʋ¸®Áö¾ÊÀº°Å°°Àºµ¥ ÇÁ·Î±×·¥ÀÌ ¿Ö¾ÈµÅ´ÂÁú ¸ô¶ó¼­ »ý°¢ÁßÀÔ´Ï´Ù.¤Ð¤Ð 2009/06/08  
tegi83 ¿¡±Ã ´©°¡Á» ¾Ë·ÁÁֽøé;; 2009/06/10  
tegi83 ÈÄ......½ºÄµÇÔ¼ö¿¡ ¿Ö ÄÞ¸¶¸¦ÇÞÁö ¤Ð¤Ð 2009/06/10  
3026   c¾ð¾î¿¡¼­ »ö±òÀÖ´Â ¹®ÀÚ¿­À» Ãâ·ÂÇÏ´Â ¹æ¹ý[2]     powermilk
05/20 5544
3025     [re] C ¾ð¾î¸¦ ¹è¿ì´Âµ¥¿ä..¤Ì¤Ì     hkpco
09/07 5525
3024   printf ·Î Ãâ·ÂÇÑ ³»¿ëÀ» ÆÄÀÏ·ÎÀúÀåÇÏ·Á¸é ¾î¶»°ÔÇؾßÇϳª¿ä..[5]     lwklwk
08/24 5524
3023     [re] c ¾ð¾î Çñ׷¡¹Ö Áú¹®¿ä!!! °í¼ö´Ôµé Á» ºÁÁÖ¼¼¿ä.¤Ð[1]     ±«µµ³ªÀÌÃ÷
02/08 5523
3022   C++ ÇÔ¼ö ¿À¹ö·Îµù ¿À·ù Áú¹®ÀÔ´Ï´Ù. [1]     sweetick
03/04 5517
3021   ÇÁ·Î½ÃÀú¿Í ÇÔ¼öÀÇ Â÷ÀÌ[2]     h@cking2013
07/30 5510
3020   À±¼º¿ìÀÇ ¿­Ç÷°­ÀÇ cÇÁ·Î±×·¡¹Ö¿¡¼­ µµÀü!ÇÁ·Î±×·¡¹Ö1[1]     yj6393
07/24 5510
3019   ¾Æ Á¤¸» ¸ð¸£°Ú³×¿ä ... °í¼ö´Ôµé µµ¿ÍÁÖ¼¼¿ä ¤Ð.¤Ð (JAVA ¼Ò½º)[3]     tlsdbcjs
03/27 5495
  ¹®ÀÚ¿­ 3°³¸¦ ³ôÀº¼ø¼­´ë·Î ¿¬°áÇÏ´ÂÇÁ·Î±×·¥ÀÔ´Ï´Ù[5]     tegi83
06/08 5487
3017     [re] crypt¶ó´Â ÇÔ¼ö´Â ¹º°¡¿ä?[1]     ChuRack
02/17 5478
3016   ÆäÀÌÁö ·Îµù½Ã Áñ°Üã±â ÀÚµ¿À¸·Î Ãß°¡µÇ±âÁ» °¡¸£ÃÄ ÁÖ¼¼¿ä[2]     dnflwltj
09/06 5466
3015   C¾ð¾î ÇÁ·ÎÅäŸÀÔ¼±¾ð[7]     twt525
12/24 5397
3014   2Â÷¿ø ¹è¿­¿¡ ´ëÇؼ­[3]     3cushion
11/02 5392
3013   C¾ð¾î ´ë¹®ÀÚ->¼Ò¹®ÀÚ ¹Ù²Ù´Â main ÇÔ¼öÀε¥..[3]     dodomania
01/15 5385
3012   c¾ð¾î Ãʺ¸ Áú¹®ÀÌ¿ä....(void¿¡ ´ëÇؼ­..)[13]     badboy25
02/04 5385
3011   C++ °ü¸® ÇÁ·Î±×·¥¿¡¼­ È­¸é¿¡ ¸Þ´º È£Ãâ½Ã ¹®Á¦Á¡...[3]     ksbgenius
05/20 5384
3010     [re] C ¾ð¾î ¿¹Á¦ ¹®Á¦,[1]     TIM_Scutum
02/05 5364
3009   Á¦°¡Á÷Á¢ ÆÐŶÀ» Á¶ÀÛÇØ º¸³»°í½Í½À´Ï´Ù[4]     ¿³Àå¼ö
01/20 5357
3008   C++ ÇÁ·Î±×·¥ Ŭ·¡½º Áú¹®[2]     killer759
05/07 5313
3007   ¿Â¶óÀÎ °ÔÀÓ ÇÁ¸®¼­¹öÀÇ ¿ø¸®´Â ¹«¾ùÀΰ¡¿ä?[9]     splo1208
09/20 5295
[1][2][3][4][5][6][7][8][9] 10 ..[161]

Copyright 1999-2024 Zeroboard / skin by Hackerschool.org / Secure Patch by Hackerschool.org