{"id":25002,"date":"2021-08-01T08:10:11","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=25002"},"modified":"2025-09-15T11:12:16","modified_gmt":"2025-09-15T02:12:16","slug":"%e3%80%90c%e8%a8%80%e8%aa%9e%e5%85%a5%e9%96%80%e3%80%91malloc%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9memset-memcpy-free-memcmp","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/25002","title":{"rendered":"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp)"},"content":{"rendered":"<p>\u307f\u306a\u3055\u3093malloc\u3092\u4f7f\u3063\u3066\u307e\u3059\u304b\uff1f<\/p>\n<p>malloc\u306f\u914d\u5217\u3084\u69cb\u9020\u4f53\u306e\u30e1\u30e2\u30ea\u3092\u52d5\u7684\u306b\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p><div class=\"box_voice\">malloc\u3092\u4f7f\u3063\u3066\u52d5\u7684\u306b\u30e1\u30e2\u30ea\u3092\u6271\u3044\u305f\u3044<\/p>\n<p>\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u9818\u57df\u3092\u95a2\u6570\u3092\u4f7f\u3063\u3066\u64cd\u4f5c\u3057\u305f\u3044<\/div><\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a\u4eba\u305f\u3061\u306b\u5411\u3051\u3066\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u5185\u5bb9\u3092\u307e\u3068\u3081\u307e\u3057\u305f\u3002<\/p>\n<div class=\"box01\">\n<ul>\n<li><b>[\u57fa\u672c]malloc\u3068\u306f<\/b><\/li>\n<li><b>[\u57fa\u672c]malloc\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/b><\/li>\n<li><b>[\u5fdc\u7528]memset\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<li><b>[\u5fdc\u7528]memcpy\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<li><b>[\u5fdc\u7528]memcmp\u306e\u4f7f\u3044\u65b9<\/b><\/li>\n<\/ul>\n<\/div>\n<p>malloc\u3067\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u306fmemset\u3001memcpy\u3001memcmp\u306a\u3069\u306e\u95a2\u6570\u3092\u4f7f\u3063\u3066\u521d\u671f\u5316\u3001\u30b3\u30d4\u30fc\u3082\u3057\u304f\u306f\u30d0\u30a4\u30c8\u5358\u4f4d\u3067\u306e\u6bd4\u8f03\u304c\u53ef\u80fd\u3067\u3059\u3002\u6c4e\u7528\u6027\u306e\u9ad8\u3044\u51e6\u7406\u3092\u66f8\u304f\u305f\u3081\u306b\u3001\u5fc5\u8981\u306a\u6280\u8853\u3067\u3059\u3002<\/p>\n<p>\u305c\u3072malloc\u306b\u3064\u3044\u3066\u3001\u8a73\u3057\u304f\u306a\u308a\u307e\u3057\u3087\u3046!<\/p>\n<p>\u307e\u305f\u3001\u9577\u3044\u8aac\u660e\u306f\u8981\u3089\u306a\u3044\u3001\u4f7f\u3044\u65b9\u3060\u3051\u77e5\u308a\u305f\u3044\uff01\u305d\u3093\u306a\u65b9\u306f\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u5148\u306b\u3001\u60c5\u5831\u3092\u3072\u3068\u307e\u3068\u3081\u306b\u3057\u3066\u304a\u304d\u307e\u3057\u305f\u306e\u3067\u3001\u305d\u3061\u3089\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\uff1e\uff1e\uff1e <a href=\"https:\/\/www.sejuku.net\/blog\/25002#i-2\">\u30b7\u30f3\u30d7\u30eb\u306b\u300c\u95a2\u6570\u306e\u5f15\u6570\u306a\u3069\u300d\u3092\u77e5\u308a\u305f\u3044\u65b9\u306f\u3053\u3061\u3089<\/a><\/p>\n<h2>malloc\u3068\u306f<\/h2>\n<p>malloc\u3068\u306f<b>\u52d5\u7684\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u95a2\u6570<\/b>\u3067\u3059\u3002<\/p>\n<p>\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u300cstdlib.h\u300d\u3067\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u5f15\u6570\u3067\u6307\u5b9a\u3059\u308b\u30d0\u30a4\u30c8\u6570\u5206\u306e\u30e1\u30e2\u30ea\u304c\u78ba\u4fdd\u3055\u308c\u3001\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u9818\u57df\u3078\u306e\u30dd\u30a4\u30f3\u30bf\u3092\u8fd4\u3057\u307e\u3059\u3002<\/p>\n<p>\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u306ffree\u95a2\u6570\u3067\u5fc5\u305a\u89e3\u653e\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h2>malloc\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/h2>\n<p>\u914d\u5217\u3084\u69cb\u9020\u4f53\u306e\u3088\u3046\u306b\u8981\u7d20\u6570\u3084\u30e1\u30f3\u30d0\u306b\u3088\u3063\u3066\u78ba\u4fdd\u3059\u308b\u30e1\u30e2\u30ea\u306e\u91cf\u304c\u7570\u306a\u308b\u5834\u5408\u306b\u3064\u3044\u3066\u3001malloc\u3092\u4f7f\u3063\u3066\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>malloc\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f<b>\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u300cstdlib.h\u300d\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3059\u308b\u5fc5\u8981<\/b>\u304c\u3042\u308a\u307e\u3059\u3002malloc\u306e\u5f15\u6570\u306b\u306fsizeof\u95a2\u6570\u3092\u4f7f\u3063\u3066\u69cb\u9020\u4f53\u306e\u578b\u3084\u914d\u5217\u306e\u8981\u7d20\u6570\u3092\u6307\u5b9a\u3057\u5fc5\u8981\u306a\u30d0\u30a4\u30c8\u6570\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u3053\u308c\u3092\u69cb\u9020\u4f53\u306e\u578b\u306e\u30dd\u30a4\u30f3\u30bf\u3084\u914d\u5217\u306e\u30dd\u30a4\u30f3\u30bf\u3067\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u306ffree\u95a2\u6570\u3092\u4f7f\u3063\u3066\u89e3\u653e\u3059\u308b\u306e\u3092\u5fd8\u308c\u306a\u3044\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:c decode:true \">#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n \n\/\/ \u69cb\u9020\u4f53\u306e\u5ba3\u8a00\ntypedef struct {\n\tint num;\n\tchar *str;\n} strct;\n \nint main(void) {\n\t\/\/ \u30dd\u30a4\u30f3\u30bf\u578b\u306e\u5909\u6570\u3092\u751f\u6210\n\tstrct *entity;\n \n\t\/\/ \u52d5\u7684\u30e1\u30e2\u30ea\u306e\u78ba\u4fdd\n\tentity = (strct*)malloc(sizeof(strct));\n \n\t\/\/ \u30e1\u30f3\u30d0\u306e\u521d\u671f\u5316\n\tentity-&gt;num = 0;\n\tentity-&gt;str = (char*)malloc(sizeof(char) * 32);\n \n\t\/\/ \u30e1\u30e2\u30ea\u306b\u6587\u5b57\u5217\u3092\u4ee3\u5165\n\tsprintf(entity-&gt;str, \"%s %s!\", \"Hello\", \"World\");\n\tprintf(\"%s\\n\", entity-&gt;str);\n \n\t\/\/ \u30e1\u30e2\u30ea\u306e\u89e3\u653e\n\tfree(entity-&gt;str);\n\tfree(entity);\n \n\treturn 0;\n}\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Hello World!\n<\/pre>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306fint\u578b\u3068\u6587\u5b57\u5217\u30dd\u30a4\u30f3\u30bf\u3092\u30e1\u30f3\u30d0\u306b\u6301\u3064strct\u578b\u306e\u69cb\u9020\u4f53\u3092\u5ba3\u8a00\u3057\u3066\u3044\u307e\u3059\u3002malloc\u95a2\u6570\u3092\u4f7f\u3063\u3066strct\u578b\u306e\u30b5\u30a4\u30ba\u306e\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3057\u3001strct\u578b\u30dd\u30a4\u30f3\u30bf\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u307e\u305f\u6587\u5b57\u3092\u5165\u308c\u308b\u305f\u3081\u306e\u300cchar\u578b\u306e\u9818\u57df\u300d\u309232\u500b\u5206\u30e1\u30e2\u30ea\u4e0a\u3078\u78ba\u4fdd\u3057\u3001\u6587\u5b57\u5217\u30dd\u30a4\u30f3\u30bf\u306b\u30ad\u30e3\u30b9\u30c8\u3057\u3066\u3044\u307e\u3059\u3002sprintf\u95a2\u6570\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u30dd\u30a4\u30f3\u30bf\u306b\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u3001printf\u95a2\u6570\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u3092\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306bfree\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30e1\u30f3\u30d0\u306e\u6587\u5b57\u5217\u30dd\u30a4\u30f3\u30bf\u3068\u69cb\u9020\u4f53\u306e\u5b9f\u4f53\u306e\u30e1\u30e2\u30ea\u3092\u89e3\u653e\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>\u305d\u306e\u4ed6\u306e\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/h2>\n<p>malloc\u95a2\u6570\u3092\u4f7f\u3063\u3066\u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u3092\u6271\u3046\u95a2\u6570\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3059\u3002\u30e1\u30e2\u30ea\u3092\u6271\u3046\u95a2\u6570\u306b\u306fmemset\u3001memcpy\u3001memcmp\u306a\u3069\u306e\u95a2\u6570\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<h3>memset\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/h3>\n<p>memset\u95a2\u6570\u306f\u4e3b\u306b<b>\u30e1\u30e2\u30ea\u3092\u521d\u671f\u5316\u3059\u308b\u5834\u5408\u306b\u4f7f\u7528<\/b>\u3057\u307e\u3059\u3002<\/p>\n<p>memset\u95a2\u6570\u3092\u4f7f\u7528\u3059\u308b\u306b\u306f\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u300cstring.h\u300d\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>memset\u95a2\u6570\u306e\u7b2c1\u5f15\u6570\u306b\u306f\u30e1\u30e2\u30ea\u3092\u8a2d\u5b9a\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30a2\u30c9\u30ec\u30b9\u3092\u3001\u7b2c2\u5f15\u6570\u306b\u306f\u30e1\u30e2\u30ea\u306b\u30bb\u30c3\u30c8\u3059\u308b\u5024\u3092\u3001\u7b2c3\u5f15\u6570\u306b\u306f\u30e1\u30e2\u30ea\u306b\u30bb\u30c3\u30c8\u3059\u308b\u5024\u306e\u6587\u5b57\u6570\u3092\u5165\u529b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"lang:c decode:true \">#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;string.h&gt;\n \n\/\/ \u69cb\u9020\u4f53\u306e\u5ba3\u8a00\ntypedef struct {\n\tint num;\n\tchar *str;\n} strct;\n \nint main(void) {\n\t\/\/ \u30dd\u30a4\u30f3\u30bf\u578b\u306e\u5909\u6570\u3092\u751f\u6210\n\tstrct *entity;\n \n\t\/\/ \u52d5\u7684\u30e1\u30e2\u30ea\u306e\u78ba\u4fdd\u3002\n\tentity = (strct*)malloc(sizeof(strct));\n \n\t\/\/ \u30e1\u30f3\u30d0\u306e\u521d\u671f\u5316\n\tentity-&gt;num = 0;\n\tentity-&gt;str = (char*)malloc(sizeof(char) * 32);\n \n\t\/\/ \u30e1\u30e2\u30ea\u306b\u6587\u5b57\u5217\u3092\u4ee3\u5165\n\tsprintf(entity-&gt;str, \"%s %s!\", \"Hello\", \"World\");\n\tprintf(\"%s\\n\", entity-&gt;str);\n \n\tchar arr_str[] = \"Hello USA!\";\n \n\t\/\/ \u30e1\u30e2\u30ea\u306e\u89e3\u653e(\u5909\u66f4\u3059\u308b\u524d\u306b\u5fc5\u305a\u89e3\u653e\u3057\u307e\u3057\u3087\u3046)\n\tfree(entity-&gt;str);\n\t\/\/ \u30e1\u30e2\u30ea\u30b5\u30a4\u30ba\u306e\u5909\u66f4\n\tentity-&gt;str = (char*)malloc(sizeof(arr_str));\n\tif(entity-&gt;str == NULL) {\n\t\tprintf(\"memory error\");\n\t\treturn -1;\n\t}\n \n\t\/\/ \u30a2\u30c9\u30ec\u30b9\u306e\u5148\u982d\u304b\u3089arr_str\u306e\u30d0\u30a4\u30c8\u6570\u5206\u3060\u3051NULL\u6587\u5b57\u3067\u66f8\u304d\u63db\u3048\n\tmemset(entity-&gt;str, '\\0', sizeof(arr_str));\n \n\tprintf(\"%s\\n\", entity-&gt;str);\n \n\t\/\/ \u30e1\u30e2\u30ea\u306e\u89e3\u653e\n\tfree(entity-&gt;str);\n\tfree(entity);\n \n\tprintf(\"processing completion\\n\");\n \n\treturn 0;\n}\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Hello World!\n \nprocessing completion\n<\/pre>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306fmalloc\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30e1\u30e2\u30ea\u306e\u30b5\u30a4\u30ba\u306e\u5909\u66f4\u3092\u884c\u3044\u3001\u305d\u306e\u5f8cmemset\u95a2\u6570\u3092\u4f7f\u3063\u3066\u6587\u5b57\u5217\u306e\u30d0\u30a4\u30c8\u6570\u5206\u3060\u3051NULL\u6587\u5b57(\\0)\u3067\u30e1\u30e2\u30ea\u306e\u5024\u3092\u66f8\u304d\u63db\u3048\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>NULL\u6587\u5b57\u3067\u66f8\u304d\u63db\u3048\u305f\u6587\u5b57\u5217\u30dd\u30a4\u30f3\u30bf\u3092\u51fa\u529b\u8868\u793a\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u3001\u7a7a\u884c\u304c1\u5217\u51fa\u529b\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>memcpy\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/h3>\n<p>memcpy\u95a2\u6570\u3092\u4f7f\u3063\u3066<b>\u69cb\u9020\u4f53\u306e\u5b9f\u4f53\u3092\u30b3\u30d4\u30fc\u3059\u308b\u65b9\u6cd5<\/b>\u3092\u8aac\u660e\u3057\u307e\u3059\u3002<\/p>\n<p>memcpy\u95a2\u6570\u306f\u7b2c1\u5f15\u6570\u306b\u30b3\u30d4\u30fc\u5148\u306e\u30a2\u30c9\u30ec\u30b9\u3001\u7b2c2\u5f15\u6570\u306b\u30b3\u30d4\u30fc\u5143\u306e\u30a2\u30c9\u30ec\u30b9\u3001\u7b2c3\u5f15\u6570\u306b\u306f\u30b3\u30d4\u30fc\u3059\u308b\u30d0\u30a4\u30c8\u6570\u3092\u5165\u529b\u3057\u307e\u3059\u3002\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5168\u4f53\u3092\u30b3\u30d4\u30fc\u3059\u308b\u5834\u5408\u3001\u7b2c3\u5f15\u6570\u306f\u30b3\u30d4\u30fc\u5143\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5168\u4f53\u306e\u30d0\u30a4\u30c8\u6570\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>memcpy\u95a2\u6570\u3067\u30b3\u30d4\u30fc\u5143\u304c\u69cb\u9020\u4f53\u306e\u5834\u5408\u306b\u30e1\u30f3\u30d0\u306b\u30dd\u30a4\u30f3\u30bf\u3092\u6301\u3063\u3066\u3044\u308b\u3068\u6ce8\u610f\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002memcpy\u95a2\u6570\u3092\u4f7f\u3063\u3066\u69cb\u9020\u4f53\u5168\u4f53\u3092\u30b3\u30d4\u30fc\u3059\u308b\u3068\u30e1\u30f3\u30d0\u306e\u30dd\u30a4\u30f3\u30bf\u306f\u6d45\u3044\u30b3\u30d4\u30fc\u3068\u306a\u308a\u3001\u30b3\u30d4\u30fc\u5143\u306e\u5024\u3092\u53c2\u7167\u3057\u307e\u3059\u3002<\/p>\n<p>\u3057\u305f\u304c\u3063\u3066\u30b3\u30d4\u30fc\u5143\u306e\u30dd\u30a4\u30f3\u30bf\u5148\u306e\u5024\u304c\u5909\u308f\u308c\u3070\u3001\u30b3\u30d4\u30fc\u5148\u306e\u30dd\u30a4\u30f3\u30bf\u306e\u5024\u3082\u4e00\u7dd2\u306b\u5909\u308f\u308a\u307e\u3059\u3002\u6df1\u3044\u30b3\u30d4\u30fc\u3092\u3059\u308b\u305f\u3081\u306b\u306f\u30e1\u30f3\u30d0\u306e\u30dd\u30a4\u30f3\u30bf\u306f\u500b\u5225\u306b\u30b3\u30d4\u30fc\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u78ba\u8a8d\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:c decode:true \">#include &lt;stdio.h&gt;\n#include &lt;stdlib.h&gt;\n#include &lt;string.h&gt;\n \n\/\/ \u69cb\u9020\u4f53\u306e\u5ba3\u8a00\ntypedef struct {\n\tint num;\n\tchar *str;\n} strct;\n \nint main(void) {\n\t\/\/ \u30dd\u30a4\u30f3\u30bf\u578b\u306e\u5909\u6570\u3092\u751f\u6210\n\tstrct *entity;\n \n\t\/\/ \u52d5\u7684\u30e1\u30e2\u30ea\u306e\u78ba\u4fdd\n\tentity = (strct*)malloc(sizeof(strct));\n \n\t\/\/ \u30e1\u30f3\u30d0\u306e\u521d\u671f\u5316\n\tentity-&gt;num = 0;\n\tentity-&gt;str = (char*)malloc(sizeof(char) * 32);\n \n\t\/\/ \u30e1\u30e2\u30ea\u306b\u6587\u5b57\u5217\u3092\u4ee3\u5165\n\tsprintf(entity-&gt;str, \"%s %s!\", \"Hello\", \"World\");\n\tprintf(\"%s\\n\", entity-&gt;str);\n \n\t\/\/\u69cb\u9020\u4f53\u306e\u5b9f\u4f53\u306e\u30b3\u30d4\u30fc\n\tstrct *copy_entity;\n\tcopy_entity = (strct*)malloc(sizeof(strct));\n\tmemcpy(copy_entity, entity, sizeof(strct)); \/\/ \u30e1\u30f3\u30d0\u306e\u30dd\u30a4\u30f3\u30bf\u306f\u6d45\u3044\u30b3\u30d4\u30fc\n \n\t\/\/ \u6d45\u3044\u30b3\u30d4\u30fc\u306e\u305f\u3081\u3001\u30b3\u30d4\u30fc\u5143\u306e\u5024\u304c\u5909\u308f\u308b\u3068\u30b3\u30d4\u30fc\u5148\u306e\u5024\u3082\u5909\u308f\u308b\n\tstrcpy(entity-&gt;str, \"Hello Japan!\");\n\tprintf(\"%s, %s\\n\", entity-&gt;str, copy_entity-&gt;str);\n \n\t\/\/ \u6df1\u3044\u30b3\u30d4\u30fc\u306b\u3059\u308b\u305f\u3081\u306b\u306f\u3001\u30e1\u30f3\u30d0\u500b\u5225\u3067\u30b3\u30d4\u30fc\u304c\u5fc5\u8981\n\tcopy_entity-&gt;str = (char*)malloc(sizeof(char) * 32);\n\tstrcpy(copy_entity-&gt;str, entity-&gt;str);\n \n\t\/\/ \u6df1\u3044\u30b3\u30d4\u30fc\u306e\u305f\u3081\u3001\u30b3\u30d4\u30fc\u5143\u306e\u5024\u304c\u5909\u308f\u3063\u3066\u3082\u30b3\u30d4\u30fc\u5148\u306e\u5024\u306f\u5909\u308f\u3089\u306a\u3044\n\tstrcpy(entity-&gt;str, \"Hello USA!\");\n\tprintf(\"%s, %s\\n\", entity-&gt;str, copy_entity-&gt;str);\n \n\t\/\/ \u30e1\u30e2\u30ea\u306e\u89e3\u653e\n\tfree(copy_entity-&gt;str);\n\tfree(copy_entity);\n\tfree(entity-&gt;str);\n\tfree(entity);\n \n\treturn 0;\n}\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Hello World!\nHello Japan!, Hello Japan!\nHello USA!, Hello Japan!\n<\/pre>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u3067\u306fmemcpy\u95a2\u6570\u3092\u4f7f\u3063\u3066\u3001\u69cb\u9020\u4f53\u306e\u5b9f\u4f53\u300centity\u300d\u3092\u300ccopy_entity\u300d\u306b\u30b3\u30d4\u30fc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u3053\u306e\u307e\u307e\u3067\u306fcopy_entity\u306e\u30e1\u30f3\u30d0\u300cstr\u300d\u306e\u5024\u306fentity\u306e\u30e1\u30f3\u30d0\u300cstr\u300d\u306e\u5024\u3092\u53c2\u7167\u3057\u307e\u3059\u3002entity\u306e\u30e1\u30f3\u30d0\u300cstr\u300d\u306e\u5024\u3092\u5909\u66f4\u3059\u308b\u3068\u3001copy_entity\u306e\u30e1\u30f3\u30d0\u300cstr\u300d\u306e\u5024\u3082\u4e00\u7dd2\u306b\u5909\u308f\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u3053\u3067\u5024\u3092\u53c2\u7167\u305b\u305a\u6df1\u3044\u30b3\u30d4\u30fc\u306b\u3059\u308b\u305f\u3081\u306b\u3001\u30e1\u30f3\u30d0\u306e\u300cstr\u300d\u306fstrcpy\u95a2\u6570\u3092\u4f7f\u3063\u3066\u500b\u5225\u306b\u30b3\u30d4\u30fc\u3092\u3057\u3066\u3044\u307e\u3059\u3002\u500b\u5225\u306e\u30b3\u30d4\u30fc\u5f8c\u306b\u30b3\u30d4\u30fc\u5143\u306eentity\u306e\u30e1\u30f3\u30d0\u300cstr\u300d\u306e\u5024\u3092\u5909\u66f4\u3057\u3066\u3082\u3001copy_entity\u306e\u30e1\u30f3\u30d0\u300cstr\u300d\u306e\u5024\u306f\u5909\u66f4\u3055\u308c\u305a\u3001\u6df1\u3044\u30b3\u30d4\u30fc\u304c\u3067\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<h3>memcmp\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066<\/h3>\n<p>memcmp\u95a2\u6570\u3092\u4f7f\u3046\u3068<b>\u6307\u5b9a\u30d0\u30a4\u30c8\u6570\u306e\u30e1\u30e2\u30ea\u9818\u57df\u3092\u6bd4\u8f03\u3059\u308b<\/b>\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>memcmp\u95a2\u6570\u306e\u7b2c1\u5f15\u6570\u3068\u7b2c2\u5f15\u6570\u306b\u306f\u6bd4\u8f03\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30dd\u30a4\u30f3\u30bf\u3092\u3001\u7b2c3\u5f15\u6570\u306b\u306f\u6bd4\u8f03\u3059\u308b\u30d0\u30a4\u30c8\u30b5\u30a4\u30ba\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002memcmp\u95a2\u6570\u306fint\u578b\u306e\u5024\u3092\u8fd4\u3057\u3001\u623b\u308a\u5024\u304c0(\u30bc\u30ed)\u306e\u5834\u5408\u306f\u6bd4\u8f03\u306e\u7d50\u679c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u4e00\u81f4\u3068\u5224\u5b9a\u3055\u308c\u3001\u305d\u308c\u4ee5\u5916\u306e\u5024\u306e\u5834\u5408\u306f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306f\u4e0d\u4e00\u81f4\u3068\u5224\u5b9a\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u30b7\u30f3\u30d7\u30eb\u306a\u30b5\u30f3\u30d7\u30eb\u3067\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:c decode:true \">#include \n#include \n#include \n\nint main(void)\n{\n    \/\/ \u5909\u6570\u306e\u7528\u610f\n    char *str1;\n    char *str2;\n    \n    \/\/ \u52d5\u7684\u30e1\u30e2\u30ea\u306e\u78ba\u4fdd\n    str1 = (char*)malloc(sizeof(char) * 32);\n    str2 = (char*)malloc(sizeof(char) * 32);\n    \n    \/\/ \u30e1\u30e2\u30ea\u306e\u521d\u671f\u5316\n    memset(str1, '\\0', sizeof(char) * 32);\n    memset(str2, '\\0', sizeof(char) * 32);\n    \n    \/\/ \u6587\u5b57\u5217\u3092\u5165\u308c\u308b\n    strcpy(str1, \"ABCDE!\");\n    strcpy(str2, \"ABCDE!\");\n\n    \/\/ \u6bd4\u8f03\u3059\u308b\n    if( memcmp( str1, str2, (sizeof(char) * 32) ) == 0 ){\n        printf(\"\u540c\u4e00\u306e\u5185\u5bb9\u3067\u3059!\");\n    }else{\n        printf(\"\u540c\u4e00\u306e\u5185\u5bb9\u3067\u306f\u3042\u308a\u307e\u305b\u3093!\");\n    }\n    \n    \/\/ \u89e3\u653e\u51e6\u7406\n    free(str1);\n    free(str2);\n    \n    return 0;\n}\n<\/pre>\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">\u540c\u4e00\u306e\u5185\u5bb9\u3067\u3059!\n<\/pre>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u3002<\/p>\n<p>str1\u30fbstr2\u3068\u3044\u3046\u4e8c\u3064\u306e\u30dd\u30a4\u30f3\u30bf\u5909\u6570\u3092\u7528\u610f\u3057\u3001\u305d\u308c\u3092\u6bd4\u8f03\u3057\u3066\u3044\u308b\u3060\u3051\u3067\u3059\u306d!<\/p>\n<h3>[\u88dc\u8db3]memcmp\u306b\u3088\u308b\u69cb\u9020\u4f53\u306e\u6bd4\u8f03<\/h3>\n<p data-start=\"75\" data-end=\"151\"><code data-start=\"75\" data-end=\"83\">memcmp<\/code> \u95a2\u6570\u306f\u5148\u307b\u3069\u306e\u30b5\u30f3\u30d7\u30eb\u306e\u3088\u3046\u306b\u30b7\u30f3\u30d7\u30eb\u306a\u7528\u9014\u3067\u3042\u308c\u3070\u554f\u984c\u3042\u308a\u307e\u305b\u3093\u304c\u3001<strong data-start=\"119\" data-end=\"148\">\u69cb\u9020\u4f53\u306e\u5b9f\u4f53\u3092\u305d\u306e\u307e\u307e\u6bd4\u8f03\u3059\u308b\u65b9\u6cd5\u306f\u63a8\u5968\u3055\u308c\u307e\u305b\u3093<\/strong>\u3002<\/p>\n<p data-start=\"153\" data-end=\"284\">\u305d\u306e\u7406\u7531\u306f\u3001\u69cb\u9020\u4f53\u306b\u306f\u30d1\u30c7\u30a3\u30f3\u30b0\u304c\u5165\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u305f\u3081\u3067\u3059\u3002<\/p>\n<p data-start=\"153\" data-end=\"284\">\u30d1\u30c7\u30a3\u30f3\u30b0\u3068\u306f\u3001\u5404\u30e1\u30f3\u30d0\u3084\u69cb\u9020\u4f53\u5168\u4f53\u306e\u30a2\u30e9\u30a4\u30f3\u30e1\u30f3\u30c8\u3092\u6e80\u305f\u3059\u305f\u3081\u306b\u3001\u30b3\u30f3\u30d1\u30a4\u30e9\u304c\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3059\u308b\u672a\u4f7f\u7528\u30d0\u30a4\u30c8\u9818\u57df\u306e\u3053\u3068\u3067\u3059\u3002<\/p>\n<p data-start=\"286\" data-end=\"380\">\u3053\u306e\u9818\u57df\u306f\u521d\u671f\u5316\u3055\u308c\u306a\u3044\u5834\u5408\u304c\u3042\u308a\u3001\u8ad6\u7406\u7684\u306b\u540c\u3058\u5185\u5bb9\u3092\u6301\u3064\u69cb\u9020\u4f53\u3067\u3082\u3001<code data-start=\"321\" data-end=\"329\">memcmp<\/code> \u3067\u6bd4\u8f03\u3059\u308b\u3068<strong data-start=\"336\" data-end=\"355\">\u30d1\u30c7\u30a3\u30f3\u30b0\u90e8\u5206\u306e\u672a\u5b9a\u7fa9\u5024\u306e\u9055\u3044<\/strong>\u306b\u3088\u3063\u3066\u300c\u4e0d\u4e00\u81f4\u300d\u3068\u5224\u5b9a\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p data-start=\"382\" data-end=\"470\">\u307e\u305f\u3001\u69cb\u9020\u4f53\u306b\u30dd\u30a4\u30f3\u30bf\u30e1\u30f3\u30d0\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u5834\u5408\u3001<code data-start=\"406\" data-end=\"414\">memcmp<\/code> \u306f\u53c2\u7167\u5148\u306e\u5185\u5bb9\u3067\u306f\u306a\u304f\u30dd\u30a4\u30f3\u30bf\u5024\u305d\u306e\u3082\u306e\uff08\u30a2\u30c9\u30ec\u30b9\uff09\u3092\u6bd4\u8f03\u3059\u308b\u305f\u3081\u3001\u610f\u56f3\u3057\u306a\u3044\u7d50\u679c\u306b\u3064\u306a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p data-start=\"472\" data-end=\"626\">\u3057\u305f\u304c\u3063\u3066\u69cb\u9020\u4f53\u3092\u6bd4\u8f03\u3057\u305f\u3044\u5834\u5408\u306f\u3001<strong data-start=\"490\" data-end=\"524\">\u81ea\u4f5c\u306e\u6bd4\u8f03\u95a2\u6570\u3092\u7528\u610f\u3057\u3001\u5404\u30e1\u30f3\u30d0\u3054\u3068\u306b\u610f\u5473\u306b\u6cbf\u3063\u305f\u65b9\u6cd5\u3067\u6bd4\u8f03<\/strong>\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u3067\u3059\u3002<br data-start=\"534\" data-end=\"537\" \/>\u6574\u6570\u578b\u306f <code data-start=\"542\" data-end=\"546\">==<\/code>\u3001\u6d6e\u52d5\u5c0f\u6570\u70b9\u306f\u8a31\u5bb9\u8aa4\u5dee\u3092\u8003\u616e\u3057\u305f\u6bd4\u8f03\u3001\u6587\u5b57\u5217\u306f <code data-start=\"570\" data-end=\"578\">strcmp<\/code>\u3001\u914d\u5217\u3084\u30d0\u30c3\u30d5\u30a1\u306f\u9577\u3055\u3092\u78ba\u8a8d\u3057\u305f\u4e0a\u3067 <code data-start=\"597\" data-end=\"605\">memcmp<\/code>\u3001\u3068\u3044\u3063\u305f\u5177\u5408\u306b\u6bd4\u8f03\u3059\u308b\u306e\u304c\u5b89\u5168\u3067\u3059\u3002<\/p>\n<p>\u300c\u6bd4\u8f03\u6f14\u7b97\u3059\u308b\u65b9\u6cd5\u300d\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u53c2\u8003\u306b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/24473\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/C-24473-150x85.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010C\u8a00\u8a9e\u5165\u9580\u3011\u69cb\u9020\u4f53\u306e\u4f7f\u3044\u65b9(struct\u3001\u30dd\u30a4\u30f3\u30bf\u3001\u30a2\u30ed\u30fc\u6f14\u7b97\u5b50)<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            \n<h2>\u5404\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u3072\u3068\u307e\u3068\u3081<\/h2>\n<p>\u6700\u5f8c\u306b\u5fa9\u7fd2\u3068\u3057\u3066\u3001\u5404\u95a2\u6570\u306e\u4f7f\u3044\u65b9\u3092\u3092\u30b7\u30f3\u30d7\u30eb\u306b\u4e00\u901a\u308a\u307f\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u52d5\u7684\u306b\u78ba\u4fdd\u3059\u308b\u300cmalloc\u95a2\u6570\u300d<\/h3>\n<p>\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3059\u308b\u306a\u3089\u3001malloc\u95a2\u6570\u3067\u3059\u3002\u4f7f\u3044\u65b9\u306f\u3001\u5f15\u6570\u306b\u78ba\u4fdd\u3057\u305f\u3044\u30d0\u30a4\u30c8\u6570\u3092\u6307\u5b9a\u3059\u308b\u3060\u3051\u3067\u3057\u305f\u306d!<\/p>\n<pre class=\"lang:c decode:true \">\/\/ \u52d5\u7684\u30e1\u30e2\u30ea\u306e\u78ba\u4fdd\nstrct* entity = (strct*)malloc(sizeof(strct));\n\/\/ \u52d5\u7684\u30e1\u30e2\u30ea\u306e\u89e3\u653e\nfree(entity);\n<\/pre>\n<p>\u307e\u305f\u4f7f\u3044\u7d42\u308f\u3063\u305f\u3089\u5fc5\u305afree\u95a2\u6570\u3067\u89e3\u653e\u3092\u884c\u3044\u307e\u3057\u3087\u3046\u3002\u52d5\u7684\u306b\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3057\u305f\u3089\u3001\u3061\u3083\u3093\u3068\u89e3\u653e\u3059\u308b\u3002<\/p>\n<p>\u78ba\u4fdd\u3068\u89e3\u653e\u306f\u30ef\u30f3\u30bb\u30c3\u30c8\u3067\u3059\u3002<\/p>\n<h3>\u30c7\u30fc\u30bf\u3092\u57cb\u3081\u308b\u306a\u3089\u300cmemset\u95a2\u6570\u300d<\/h3>\n<p>memset\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3057\u305f\u9818\u57df\u3092\u3001\u6307\u5b9a\u3057\u305f\u5024\u3067\u5168\u3066\u4e0a\u66f8\u304d\u3057\u3066\u304f\u308c\u308b\u95a2\u6570\u3067\u3059\u3002<\/p>\n<p><b>\u4e3b\u306b\u521d\u671f\u5316\u306b\u4f7f\u308f\u308c\u308b\u95a2\u6570\u3067\u3059\u3002<\/b><\/p>\n<pre class=\"lang:c decode:true \">\/\/ \u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\nchar* str = (char*)malloc(sizeof(char) * 32);   \n\/\/ \\0\u3067\u3001\u30e1\u30e2\u30ea\u306e\u6307\u5b9a\u9818\u57df\u3092\u4e0a\u66f8\u304d\u3057\u305f\u3044\u5834\u5408\nmemset(str, '\\0', sizeof(char) * 32);\n<\/pre>\n<p>\u5f15\u6570:<br \/>\n\u7b2c\u4e00\u5f15\u6570\u30fb\u30fb\u30fb\u5bfe\u8c61\u306e\u30e1\u30e2\u30ea\u306e\u30dd\u30a4\u30f3\u30bf<br \/>\n\u7b2c\u4e8c\u5f15\u6570\u30fb\u30fb\u30fb\u4e0a\u66f8\u304d\u3059\u308b\u5024\u3092\u6307\u5b9a<br \/>\n\u7b2c\u4e09\u5f15\u6570\u30fb\u30fb\u30fb\u4e0a\u66f8\u304d\u3059\u308b\u30d0\u30a4\u30c8\u6570<\/p>\n<h3>\u30b3\u30d4\u30fc\u3059\u308b\u306a\u3089\u300cmemcpy\u95a2\u6570\u300d<\/h3>\n<p>\u30c7\u30fc\u30bf\u306e\u30b3\u30d4\u30fc\u306a\u3089\u3070memcpy\u95a2\u6570\u3092\u4f7f\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:c decode:true \">\/\/ char\u578b32\u500b\u5206\u306e\u9818\u57df\u3092\u30b3\u30d4\u30fc\u3057\u305f\u3044\u5834\u5408\nmemcpy(str1, str2, sizeof(char) * 32);\n<\/pre>\n<p>\u5f15\u6570:<br \/>\n\u7b2c\u4e00\u5f15\u6570\u30fb\u30fb\u30fb\u30b3\u30d4\u30fc\u5148\u306e\u30dd\u30a4\u30f3\u30bf<br \/>\n\u7b2c\u4e8c\u5f15\u6570\u30fb\u30fb\u30fb\u30b3\u30d4\u30fc\u5143\u306e\u30dd\u30a4\u30f3\u30bf<br \/>\n\u7b2c\u4e09\u5f15\u6570\u30fb\u30fb\u30fb\u30b3\u30d4\u30fc\u3059\u308b\u30d0\u30a4\u30c8\u6570<\/p>\n<h3>\u6bd4\u8f03\u3059\u308b\u306a\u3089\u300cmemcmp\u95a2\u6570\u300d<\/h3>\n<p>\u4e8c\u3064\u306e\u6307\u5b9a\u3057\u305f\u9818\u57df\u304c\u540c\u3058\u304b\u3069\u3046\u304b\u306fmemcmp\u95a2\u6570\u3067\u6bd4\u8f03\u3067\u304d\u307e\u3059\u3002\u540c\u3058\u5834\u5408\u306f\u30010\u304c\u623b\u308a\u5024\u3068\u3057\u3066\u53d6\u5f97\u3067\u308b\u306e\u3067\u3001\u305d\u308c\u3092if\u5206\u3067\u5224\u5b9a\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u307e\u305f\u672c\u7de8\u3067\u8aac\u660e\u304c\u3042\u3063\u305f\u3088\u3046\u306b\u3001\u69cb\u9020\u4f53\u306e\u6bd4\u8f03\u306f\u6b63\u78ba\u306b\u884c\u3048\u306a\u3044\u306e\u3067\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"lang:c decode:true \">if( memcmp(str1, str2, sizeof(char) * 32) == 0) {\n    printf(\"\u540c\u3058\u3067\u3059\");\n} else {\n    printf(\"\u9055\u3044\u307e\u3059\");\n}\n<\/pre>\n<p>\u5f15\u6570:<br \/>\n\u7b2c\u4e00\u5f15\u6570\u30fb\u30fb\u30fb\u6bd4\u8f03\u3059\u308b\u30dd\u30a4\u30f3\u30bf1<br \/>\n\u7b2c\u4e8c\u5f15\u6570\u30fb\u30fb\u30fb\u6bd4\u8f03\u3059\u308b\u30dd\u30a4\u30f3\u30bf2<br \/>\n\u7b2c\u4e09\u5f15\u6570\u30fb\u30fb\u30fb\u6bd4\u8f03\u3059\u308b\u30d0\u30a4\u30c8\u6570<\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3053\u3053\u3067\u306f\u3001malloc\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u307e\u305fmemset\u3001memcpy\u3001memcmp\u3068\u3044\u3063\u305f\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30e1\u30e2\u30ea\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5\u306b\u3064\u3044\u3066\u8aac\u660e\u3057\u307e\u3057\u305f\u3002\u30dd\u30a4\u30f3\u30bf\u3092\u30e1\u30f3\u30d0\u306b\u6301\u3064\u69cb\u9020\u4f53\u306b\u3064\u3044\u3066memcpy\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30b3\u30d4\u30fc\u64cd\u4f5c\u3059\u308b\u5834\u5408\u306f\u5b9f\u4f53\u5168\u4f53\u306e\u30b3\u30d4\u30fc\u3067\u306f\u6d45\u3044\u30b3\u30d4\u30fc\u3068\u306a\u308b\u306e\u3067\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3001\u3053\u306e\u8a18\u4e8b\u3092\u4f55\u5ea6\u3082\u53c2\u8003\u306b\u3057\u3066\u4e0b\u3055\u3044\u306d\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u307f\u306a\u3055\u3093malloc\u3092\u4f7f\u3063\u3066\u307e\u3059\u304b\uff1f malloc\u306f\u914d\u5217\u3084\u69cb\u9020\u4f53\u306e\u30e1\u30e2\u30ea\u3092\u52d5\u7684\u306b\u78ba\u4fdd\u3059\u308b\u305f\u3081\u306b\u4f7f\u7528\u3059\u308b\u95a2\u6570\u3067\u3059\u3002 malloc\u3092\u4f7f\u3063\u3066\u52d5\u7684\u306b\u30e1\u30e2\u30ea\u3092\u6271\u3044\u305f\u3044 \u78ba\u4fdd\u3057\u305f\u30e1\u30e2\u30ea\u9818\u57df\u3092\u95a2\u6570\u3092\u4f7f\u3063\u3066\u64cd\u4f5c\u3057\u305f\u3044 \u4eca\u56de\u306f\u305d\u3093\u306a\u4eba\u305f\u3061 [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":25018,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[2336],"tags":[66],"class_list":["post-25002","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-lang-study","tag-c"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/25002\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/25002\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/sejuku2013\/\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-15T02:12:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002\"},\"author\":{\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\"},\"headline\":\"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp)\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2025-09-15T02:12:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002\"},\"wordCount\":281,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg\",\"keywords\":[\"C\u8a00\u8a9e\"],\"articleSection\":[\"C\u8a00\u8a9e\u5b66\u7fd2\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002\",\"name\":\"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2025-09-15T02:12:16+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/06\\\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/25002#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/e8ca7fd09857a736a25e6b4455a3ab61\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8\"},\"description\":\"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\\\/Web\u958b\u767a\\\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\\\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\\\/\u30b2\u30fc\u30e0\u958b\u767a\\\/AI\\\/Web\u30c7\u30b6\u30a4\u30f3\",\"sameAs\":[\"https:\\\/\\\/www.sejuku.net\\\/\",\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\\\/\",\"https:\\\/\\\/www.instagram.com\\\/samuraiengineer_official\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\"],\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-blog\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/25002","og_locale":"ja_JP","og_type":"article","og_title":"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/25002","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_author":"https:\/\/www.facebook.com\/sejuku2013\/","article_published_time":"1970-01-01T00:00:00+00:00","article_modified_time":"2025-09-15T02:12:16+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/25002#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/25002"},"author":{"name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61"},"headline":"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp)","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2025-09-15T02:12:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/25002"},"wordCount":281,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/25002#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg","keywords":["C\u8a00\u8a9e"],"articleSection":["C\u8a00\u8a9e\u5b66\u7fd2"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/25002","url":"https:\/\/www.sejuku.net\/blog\/25002","name":"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/25002#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/25002#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2025-09-15T02:12:16+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp) \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/25002#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/25002"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/25002#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/06\/\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9memset-memcpy-free-memcmp.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/25002#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010C\u8a00\u8a9e\u5165\u9580\u3011malloc\u306e\u4f7f\u3044\u65b9(memset, memcpy, free, memcmp)"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/e8ca7fd09857a736a25e6b4455a3ab61","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/507c280c5c67d2c11fec4fdba20e5bf1ec2fe91f9deb42d2ec50382778b311bf?s=96&d=mm&r=g","caption":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u7de8\u96c6\u90e8"},"description":"\u3010\u30d7\u30ed\u30d5\u30a3\u30fc\u30eb\u3011 DX\u8a8d\u5b9a\u53d6\u5f97\u4e8b\u696d\u8005\u306b\u9078\u5b9a\u3055\u308c\u3066\u3044\u308b\u682a\u5f0f\u4f1a\u793eSAMURAI\u306e\u30de\u30fc\u30b1\u30c6\u30a3\u30f3\u30b0\u30fb\u30b3\u30df\u30e5\u30cb\u30b1\u30fc\u30b7\u30e7\u30f3\u90e8\u304c\u904b\u55b6\u3002\u300c\u8cea\u306e\u9ad8\u3044IT\u6559\u80b2\u3092\u3001\u3059\u3079\u3066\u306e\u4eba\u306b\u300d\u3092\u30df\u30c3\u30b7\u30e7\u30f3\u306b\u3001IT\u30fb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u3092\u5b66\u3073\u59cb\u3081\u305f\u521d\u5b66\u8005\u306e\u65b9\u306b\u5411\u3051\u8a18\u4e8b\u3092\u57f7\u7b46\u3002 \u7d2f\u8a08\u6307\u5c0e\u8005\u65704\u4e075,000\u540d\u4ee5\u4e0a\u306e\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u300c\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u300d\u3001\u7d2f\u8a08\u767b\u9332\u8005\u65701\u4e078,000\u4eba\u4ee5\u4e0a\u306e\u30aa\u30f3\u30e9\u30a4\u30f3\u5b66\u7fd2\u30b5\u30fc\u30d3\u30b9\u300c\u4f8d\u30c6\u30e9\u30b3\u30e4\u300d\u3067\u6271\u3046\u6559\u6750\u958b\u767a\u306e\u30ce\u30a6\u30cf\u30a6\u30012013\u5e74\u306e\u5275\u696d\u304b\u3089\u904b\u55b6\u3067\u5f97\u305f\u77e5\u898b\u306b\u57fa\u3065\u304d\u3001\u8a18\u4e8b\u306e\u57f7\u7b46\u3060\u3051\u3067\u306a\u304f\u7de8\u96c6\u30fb\u76e3\u4fee\u3082\u62c5\u5f53\u3057\u3066\u3044\u307e\u3059\u3002 \u3010\u5c02\u9580\u5206\u91ce\u3011 IT\/Web\u958b\u767a\/AI\u30fb\u30ed\u30dc\u30c3\u30c8\u958b\u767a\/\u30a4\u30f3\u30d5\u30e9\u958b\u767a\/\u30b2\u30fc\u30e0\u958b\u767a\/AI\/Web\u30c7\u30b6\u30a4\u30f3","sameAs":["https:\/\/www.sejuku.net\/","https:\/\/www.facebook.com\/sejuku2013\/","https:\/\/www.instagram.com\/samuraiengineer_official\/","https:\/\/x.com\/https:\/\/twitter.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g"],"url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-blog"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/25002","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=25002"}],"version-history":[{"count":1,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/25002\/revisions"}],"predecessor-version":[{"id":297946,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/25002\/revisions\/297946"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/25018"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=25002"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=25002"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=25002"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}