4.3 ãã¤ã³ã¿é å ããã§ã¯ã次ã®ããã°ã©ã ãä¾ã«ã¨ã£ã¦ããã¤ã³ã¿ãè¦ç´ ã¨ãã¦æã¤é åãèãã¦ã¿ããã int i; char *pstr[5]; /* 1. */ char str[100]; /* 2. */ for(i = 0; i < 5; i++){ scanf("%s", str); /* 3. */ pstr[i] = (char *)malloc(sizeof(char) * (strlen(str)+1)); /* 4. */ strcpy(pstr[i], str); /* 5. */ } char *pstr[5]; ã®å®£è¨ã¯ãpstrã5åã®è¦ç´ ãæã¤é åã§ããã ãã®åè¦ç´ ãcharåã®ãã¼ã¿ãæã示ããã¤ã³ã¿ã§ãããã¨ãæå³ãã¾ãã ããã«ãããpstr[0]èªä½ã¯ãã¤ã³ã¿å¤æ°ã¨ãªãã¾ãã®ã§ã charåã®ãã¼ã¿ãæãã¢ãã¬ã¹ãæ ¼ç´ããããã¨ã«ãªãã¾ãã st
{{#tags}}- {{label}}
{{/tags}}