{"id":125,"date":"2020-05-14T09:30:45","date_gmt":"2020-05-14T01:30:45","guid":{"rendered":"http:\/\/122.152.205.50\/wordpress\/?p=125"},"modified":"2024-08-30T15:49:47","modified_gmt":"2024-08-30T07:49:47","slug":"xxxx","status":"publish","type":"post","link":"http:\/\/xinyiworld.top\/wordpress_it\/?p=125","title":{"rendered":"C\u8bed\u8a0004-\u6307\u9488\uff08C\u8bed\u8a00\u7684\u96be\u70b9\u3001\u6838\u5fc3\uff09"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_16 counter-hierarchy counter-decimal ez-toc-grey\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u76ee\u5f55<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" style=\"display: none;\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1%E6%8C%87%E9%92%88%E7%9A%84%E6%A6%82%E5%BF%B5\" title=\"1.\u6307\u9488\u7684\u6982\u5ff5\">1.\u6307\u9488\u7684\u6982\u5ff5<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2%E6%8C%87%E9%92%88%E5%8F%98%E9%87%8F%E7%9A%84%E5%A3%B0%E6%98%8E\" title=\"2.\u6307\u9488\u53d8\u91cf\u7684\u58f0\u660e\">2.\u6307\u9488\u53d8\u91cf\u7684\u58f0\u660e<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#3%E5%8F%B7%E7%9A%84%E4%B8%89%E7%A7%8D%E5%90%AB%E4%B9%89\" title=\"3.*\u53f7\u7684\u4e09\u79cd\u542b\u4e49\">3.*\u53f7\u7684\u4e09\u79cd\u542b\u4e49<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#4%E6%8C%87%E9%92%88%E7%9A%84%E7%B1%BB%E5%9E%8B%E5%92%8C%E9%95%BF%E5%BA%A6\" title=\"4.\u6307\u9488\u7684\u7c7b\u578b\u548c\u957f\u5ea6\">4.\u6307\u9488\u7684\u7c7b\u578b\u548c\u957f\u5ea6<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#%E6%8C%87%E9%92%88%E8%BF%90%E7%AE%97\" title=\"\u6307\u9488\u8fd0\u7b97\">\u6307\u9488\u8fd0\u7b97<\/a><ul class=\"ez-toc-list-level-4\"><li class=\"ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1_%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%92%8C%E6%8C%87%E9%92%88%E6%89%80%E6%8C%87%E5%90%91%E7%9A%84%E7%B1%BB%E5%9E%8B%E4%B8%8D%E4%B8%80%E8%87%B4%E6%97%B6%EF%BC%8C%E8%A6%81%E6%B3%A8%E6%84%8F%E7%9A%84%E4%BD%BF%E7%94%A8\" title=\"1. \u6307\u9488\u7c7b\u578b\u548c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6\uff0c\u8981\u6ce8\u610f++\u7684\u4f7f\u7528\">1. \u6307\u9488\u7c7b\u578b\u548c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6\uff0c\u8981\u6ce8\u610f++\u7684\u4f7f\u7528<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-4\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2_%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%92%8C%E6%8C%87%E9%92%88%E6%89%80%E6%8C%87%E5%90%91%E7%9A%84%E7%B1%BB%E5%9E%8B%E4%B8%8D%E4%B8%80%E8%87%B4%E6%97%B6%EF%BC%8C%E5%BC%BA%E8%BD%AC%E5%90%8E%E8%BE%93%E5%87%BA%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82\" title=\"2. \u6307\u9488\u7c7b\u578b\u548c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6\uff0c\u5f3a\u8f6c\u540e\u8f93\u51fa\u7684\u95ee\u9898\u3002\">2. \u6307\u9488\u7c7b\u578b\u548c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6\uff0c\u5f3a\u8f6c\u540e\u8f93\u51fa\u7684\u95ee\u9898\u3002<\/a><\/li><\/ul><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#5%E6%8C%87%E9%92%88%E4%B8%8E%E5%90%84%E7%A7%8D%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E7%9A%84%E5%85%B3%E7%B3%BB\" title=\"5.\u6307\u9488\u4e0e\u5404\u79cd\u6570\u636e\u7c7b\u578b\u7684\u5173\u7cfb\">5.\u6307\u9488\u4e0e\u5404\u79cd\u6570\u636e\u7c7b\u578b\u7684\u5173\u7cfb<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#5-1%E6%95%B0%E7%BB%84%E4%B8%8E%E6%8C%87%E9%92%88\" title=\"5-1.\u6570\u7ec4\u4e0e\u6307\u9488\">5-1.\u6570\u7ec4\u4e0e\u6307\u9488<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1%E6%95%B0%E7%BB%84%E5%90%8D%E6%98%AF%E4%B8%80%E4%B8%AA%E6%8C%87%E9%92%88%EF%BC%8C%E4%BD%86%E6%98%AF%E4%B8%8D%E6%98%AF%E4%B8%80%E4%B8%AA%E5%8F%98%E9%87%8F%E3%80%82%E4%B8%8D%E5%8F%AF%E8%83%BD%E5%AF%B9%E5%AE%83%E8%BF%9B%E8%A1%8C%E8%BF%90%E7%AE%97%E3%80%82%E4%B8%8D%E5%8F%AF%E4%BD%BF%E7%94%A8%E5%9C%A8%E5%B8%B8%E9%87%8F%E4%B8%8A\" title=\"1.\u6570\u7ec4\u540d\u662f\u4e00\u4e2a\u6307\u9488\uff0c\u4f46\u662f\u4e0d\u662f\u4e00\u4e2a\u53d8\u91cf\u3002\u4e0d\u53ef\u80fd\u5bf9\u5b83\u8fdb\u884c++\u8fd0\u7b97\u3002++\u4e0d\u53ef\u4f7f\u7528\u5728\u5e38\u91cf\u4e0a\">1.\u6570\u7ec4\u540d\u662f\u4e00\u4e2a\u6307\u9488\uff0c\u4f46\u662f\u4e0d\u662f\u4e00\u4e2a\u53d8\u91cf\u3002\u4e0d\u53ef\u80fd\u5bf9\u5b83\u8fdb\u884c++\u8fd0\u7b97\u3002++\u4e0d\u53ef\u4f7f\u7528\u5728\u5e38\u91cf\u4e0a<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2%E5%A6%82%E4%BD%95%E5%88%A9%E7%94%A8%E6%8C%87%E5%90%91%E6%95%B0%E7%BB%84%E7%9A%84%E6%8C%87%E9%92%88%E5%BE%97%E5%88%B0%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0%E4%B8%AA%E6%95%B0%EF%BC%9F\" title=\"2.\u5982\u4f55\u5229\u7528\u6307\u5411\u6570\u7ec4\u7684\u6307\u9488\u5f97\u5230\u6570\u7ec4\u5143\u7d20\u4e2a\u6570\uff1f\">2.\u5982\u4f55\u5229\u7528\u6307\u5411\u6570\u7ec4\u7684\u6307\u9488\u5f97\u5230\u6570\u7ec4\u5143\u7d20\u4e2a\u6570\uff1f<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0%E7%9A%84%E5%86%85%E5%AD%98%E5%9C%B0%E5%9D%80%E6%98%AF%E8%BF%9E%E7%BB%AD%E7%9A%84\" title=\"2.\u6570\u7ec4\u5143\u7d20\u7684\u5185\u5b58\u5730\u5740\u662f\u8fde\u7eed\u7684\">2.\u6570\u7ec4\u5143\u7d20\u7684\u5185\u5b58\u5730\u5740\u662f\u8fde\u7eed\u7684<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-13\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#3%E6%95%B0%E7%BB%84%E4%B8%8E%E6%8C%87%E9%92%88%E7%9A%84%E7%9B%B8%E4%BA%92%E8%A1%A8%E7%A4%BA\" title=\"3.\u6570\u7ec4\u4e0e\u6307\u9488\u7684\u76f8\u4e92\u8868\u793a\">3.\u6570\u7ec4\u4e0e\u6307\u9488\u7684\u76f8\u4e92\u8868\u793a<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-14\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#5-2%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%8E%E6%8C%87%E9%92%88\" title=\"5-2.\u5b57\u7b26\u4e32\u4e0e\u6307\u9488\">5-2.\u5b57\u7b26\u4e32\u4e0e\u6307\u9488<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-15\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1%EF%BC%89%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%98%AF%E5%B8%B8%E9%87%8F%E6%95%B0%E7%BB%84\" title=\"1\uff09\u5b57\u7b26\u4e32\u662f\u5e38\u91cf\u6570\u7ec4\">1\uff09\u5b57\u7b26\u4e32\u662f\u5e38\u91cf\u6570\u7ec4<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-16\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2%EF%BC%89%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E5%88%9B%E5%BB%BA%E5%BD%A2%E5%BC%8F\" title=\"2\uff09\u5b57\u7b26\u4e32\u7684\u521b\u5efa\u5f62\u5f0f\">2\uff09\u5b57\u7b26\u4e32\u7684\u521b\u5efa\u5f62\u5f0f<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-17\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#3%EF%BC%89%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E6%89%93%E5%8D%B0\" title=\"3\uff09\u5b57\u7b26\u4e32\u7684\u6253\u5370\">3\uff09\u5b57\u7b26\u4e32\u7684\u6253\u5370<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-18\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#5-3%E5%87%BD%E6%95%B0%E4%B8%8E%E6%8C%87%E9%92%88\" title=\"5-3.\u51fd\u6570\u4e0e\u6307\u9488\">5-3.\u51fd\u6570\u4e0e\u6307\u9488<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-19\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1%EF%BC%89_strcpy%E5%87%BD%E6%95%B0\" title=\"1\uff09 strcpy\u51fd\u6570\">1\uff09 strcpy\u51fd\u6570<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-20\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2%EF%BC%89_printf%E5%87%BD%E6%95%B0\" title=\"2\uff09 printf\u51fd\u6570\">2\uff09 printf\u51fd\u6570<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-21\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#3sizeof%E5%87%BD%E6%95%B0\" title=\"3.sizeof\u51fd\u6570\">3.sizeof\u51fd\u6570<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-22\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#4C%E8%AF%AD%E8%A8%80%E4%B8%AD%E5%87%BD%E6%95%B0%E8%BF%94%E5%9B%9E%E7%9A%84%E5%AD%97%E7%AC%A6%E6%95%B0%E7%BB%84%E4%B8%BAnull-%E5%87%BD%E6%95%B0%E4%B8%AD%E7%9A%84%E5%B1%80%E9%83%A8%E5%AD%97%E7%AC%A6%E6%95%B0%E7%BB%84\" title=\"4.C\u8bed\u8a00\u4e2d\u51fd\u6570\u8fd4\u56de\u7684\u5b57\u7b26\u6570\u7ec4\u4e3anull\u2014\u2014\u51fd\u6570\u4e2d\u7684\u5c40\u90e8\u5b57\u7b26\u6570\u7ec4\">4.C\u8bed\u8a00\u4e2d\u51fd\u6570\u8fd4\u56de\u7684\u5b57\u7b26\u6570\u7ec4\u4e3anull\u2014\u2014\u51fd\u6570\u4e2d\u7684\u5c40\u90e8\u5b57\u7b26\u6570\u7ec4<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-23\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#5-4%E6%8C%87%E9%92%88%E5%92%8C%E7%BB%93%E6%9E%84%E4%BD%93\" title=\"5-4.\u6307\u9488\u548c\u7ed3\u6784\u4f53\">5-4.\u6307\u9488\u548c\u7ed3\u6784\u4f53<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-24\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#%E4%B8%80%E4%B8%AA%E9%A2%A0%E8%A6%86%E4%B8%89%E8%A7%82%E7%9A%84%E5%AE%9E%E9%AA%8C\" title=\"\u4e00\u4e2a\u98a0\u8986\u4e09\u89c2\u7684\u5b9e\u9a8c\">\u4e00\u4e2a\u98a0\u8986\u4e09\u89c2\u7684\u5b9e\u9a8c<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-25\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#6%E5%A4%9A%E7%BA%A7%E6%8C%87%E9%92%88\" title=\"6.\u591a\u7ea7\u6307\u9488\">6.\u591a\u7ea7\u6307\u9488<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-26\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1%E4%BA%8C%E7%BA%A7%E6%8C%87%E9%92%88%E7%A4%BA%E4%BE%8B1\" title=\"1)\u4e8c\u7ea7\u6307\u9488\u793a\u4f8b1\">1)\u4e8c\u7ea7\u6307\u9488\u793a\u4f8b1<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-27\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#7%E5%87%BD%E6%95%B0%E6%8C%87%E9%92%88\" title=\"7.\u51fd\u6570\u6307\u9488\">7.\u51fd\u6570\u6307\u9488<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-28\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#8%E6%8C%87%E9%92%88%E7%9A%84%E5%B8%B8%E8%A7%81%E9%94%99%E8%AF%AF\" title=\"8.\u6307\u9488\u7684\u5e38\u89c1\u9519\u8bef\">8.\u6307\u9488\u7684\u5e38\u89c1\u9519\u8bef<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-29\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#9%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3%E6%8C%87%E9%92%88\" title=\"9.\u6df1\u5165\u7406\u89e3\u6307\u9488\">9.\u6df1\u5165\u7406\u89e3\u6307\u9488<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-30\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#10%E5%A4%8D%E6%9D%82%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%88%A4%E6%96%AD\" title=\"10.\u590d\u6742\u6307\u9488\u7c7b\u578b\u5224\u65ad\">10.\u590d\u6742\u6307\u9488\u7c7b\u578b\u5224\u65ad<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-31\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#%E5%A4%8D%E6%9D%82%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%88%A4%E6%96%AD%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%8E%9F%E5%88%99\" title=\"\u590d\u6742\u6307\u9488\u7c7b\u578b\u5224\u65ad\u7684\u57fa\u672c\u539f\u5219\">\u590d\u6742\u6307\u9488\u7c7b\u578b\u5224\u65ad\u7684\u57fa\u672c\u539f\u5219<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-32\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#1_%E5%85%B3%E4%BA%8E%E3%80%90int_p3%E3%80%91%E4%B8%8E%E3%80%90int_p3%E3%80%91%E4%B8%A4%E4%B8%AA%E7%9A%84%E5%8C%BA%E5%88%AB\" title=\"1. \u5173\u4e8e\u3010int (p)[3]\u3011\u4e0e\u3010int p[3]\u3011\u4e24\u4e2a\u7684\u533a\u522b\">1. \u5173\u4e8e\u3010int (p)[3]\u3011\u4e0e\u3010int p[3]\u3011\u4e24\u4e2a\u7684\u533a\u522b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-33\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#2int_p3%E4%B8%8E_Int_p_int\" title=\"2.int (p)[3]\u4e0e Int (p)( int )\">2.int (p)[3]\u4e0e Int (p)( int )<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-34\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#11_%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2\" title=\"11. \u6307\u9488\u7c7b\u578b\u8f6c\u6362\">11. \u6307\u9488\u7c7b\u578b\u8f6c\u6362<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-35\" href=\"http:\/\/xinyiworld.top\/wordpress_it\/?p=125\/#12%E6%8C%87%E9%92%88%E5%AE%89%E5%85%A8%E9%97%AE%E9%A2%98\" title=\"12.\u6307\u9488\u5b89\u5168\u95ee\u9898\">12.\u6307\u9488\u5b89\u5168\u95ee\u9898<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"1%E6%8C%87%E9%92%88%E7%9A%84%E6%A6%82%E5%BF%B5\"><\/span>1.\u6307\u9488\u7684\u6982\u5ff5<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/blog.csdn.net\/Lemon_jay\/article\/details\/82917000\">https:\/\/blog.csdn.net\/Lemon_jay\/article\/details\/82917000<\/a><\/p>\n<p>\u6307\u9488\u662f\u4e00\u79cd\u7279\u6b8a\u7684\u6570\u636e\u7c7b\u578b\uff0c\u6307\u9488\u7c7b\u578b\u7684\u53d8\u91cf\u4e00\u822c\u90fd\u662f\u6307\u5411\u67d0\u4e2a\u5185\u5b58\u7684\u5730\u5740\u3002<\/p>\n<p><strong>C\u8bed\u8a00\u7684\u6307\u9488\u7c7b\u578b\u5305\u62ec\u4e24\u65b9\u9762\u7684\u4fe1\u606f\uff1a\u4e00\u662f\u5730\u5740\uff0c\u5b58\u653e\u5728\u6307\u9488\u53d8\u91cf\u4e2d\uff1b\u4e8c\u662f\u7c7b\u578b\u4fe1\u606f\uff0c\u5173\u4e4e\u4e8e\u8bfb\u5199\u7684\u957f\u5ea6\uff0c\u6ca1\u6709\u5b58\u50a8\u5728\u6307\u9488\u53d8\u91cf\u4e2d\uff0c\u4f4d\u4e8e\u7528\u8be5\u6307\u9488\u8bfb\u5199\u65f6\u7684mov\u6307\u4ee4\u4e2d\uff0c\u4e0d\u540c\u7684\u8bfb\u5199\u957f\u5ea6\u5bf9\u5e94\u7684mov\u6307\u4ee4\u4e0d\u540c\u3002\uff08<\/strong><a href=\"https:\/\/www.jb51.net\/article\/41457.htm\">https:\/\/www.jb51.net\/article\/41457.htm<\/a><strong>\uff09<\/strong><\/p>\n<h2><span class=\"ez-toc-section\" id=\"2%E6%8C%87%E9%92%88%E5%8F%98%E9%87%8F%E7%9A%84%E5%A3%B0%E6%98%8E\"><\/span>2.\u6307\u9488\u53d8\u91cf\u7684\u58f0\u660e<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u6570\u636e\u7c7b\u578b* \u6307\u9488\u53d8\u91cf\u540d = ...;<br \/>\n\u8fd9\u91cc\u7684\u201c\u6570\u636e\u7c7b\u578b\u201d\u53ef\u4ee5\u662f\u4efb\u4f55\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5305\u62ec\u57fa\u672c\u6570\u636e\u7c7b\u578b\u3001\u6570\u7ec4\u3001\u7ed3\u6784\u4f53\u3001\u679a\u4e3e\uff0c\u751a\u81f3\u8fd8\u53ef\u4ee5\u662f\u6307\u9488\uff08\u591a\u7ea7\u6307\u9488 \uff09\u3001\u51fd\u6570\u540d\uff08\u8868\u793a\u683c\u5f0f\u548c\u8fd9\u4e2a\u6709\u70b9\u4e0d\u4e00\u6837\uff09\u3002\u603b\u4e4b\uff0c\u6307\u9488\u53ef\u4ee5\u4e0e\u5404\u79cd\u6570\u636e\u7c7b\u578b\u6392\u5217\u7ec4\u5408\uff0c\u5bfc\u81f4\u4e86\u5b83\u7684\u590d\u6742\u6027\u3002<\/p>\n<p>\u8fd8\u6709\u5176\u5b83\u7684\u6307\u9488\u7c7b\u578b\u7684\u53d8\u91cf\uff0c\u4e0d\u4e00\u5b9a\u8981\u7528*\u6765\u8868\u793a\uff0c\u6bd4\u5982\u6570\u7ec4\u540d\uff0c\u6570\u7ec4\u540d\u672c\u8eab\u5c31\u662f\u6307\u9488\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"3%E5%8F%B7%E7%9A%84%E4%B8%89%E7%A7%8D%E5%90%AB%E4%B9%89\"><\/span><strong>3.*\u53f7\u7684\u4e09\u79cd\u542b\u4e49<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\\1. <em>\u4ee3\u8868\u4e58\u6cd5<br \/>\n\\2. \u4ee3\u8868\u6307\u9488\u6570\u636e\u7c7b\u578b\u3002\u5982\u679c<\/em>\u53f7\u653e\u5230\u4e00\u79cd\u6570\u636e\u7c7b\u578b\u7684\u540e\u9762 \u90a3\u4e48\u5c31\u4ee3\u8868\u8fd9\u79cd\u6570\u636e\u7c7b\u578b\u7684\u6307\u9488 \u6bd4\u5982 int<em> float<\/em> \uff0c\u5f53\u7136\uff0c\u7c7b\u578b\u8fd8\u53ef\u4ee5\u662f\u66f4\u4e3a\u590d\u6742\u7684\u6570\u636e\u7c7b\u578b\uff0c\u5982\u7ed3\u6784\u4f53\uff0c\u679a\u4e3e\uff0c\u8054\u5408\u4f53\u3002 \u7c7b\u578b\u5f53\u7136\u4e5f\u53ef\u4ee5\u662f\u6307\u9488\u672c\u8eab\uff0c\u8fd9\u6837\u5c31\u5f62\u6210\u4e86\u591a\u7ea7\u6307\u9488\u3002<br \/>\n3.\u4ee3\u8868\u53d6\u51fa\u6307\u9488\u53d8\u91cf\u7684\u5730\u5740\u7684\u6570\u636e\u3002*\u53f7 \u5982\u679c\u653e\u5230\u6307\u9488\u53d8\u91cf\u7684\u524d\u9762  \u4ee3\u8868\u53d6\u51fa\u8be5\u53d8\u91cf\u91cc\u9762\u7684\u5730\u5740\u7684\u5bf9\u5e94\u7684\u6570\u636e <\/p>\n<h2><span class=\"ez-toc-section\" id=\"4%E6%8C%87%E9%92%88%E7%9A%84%E7%B1%BB%E5%9E%8B%E5%92%8C%E9%95%BF%E5%BA%A6\"><\/span>4.\u6307\u9488\u7684\u7c7b\u578b\u548c\u957f\u5ea6<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4e0d\u7ba1\u4ec0\u4e48\u7c7b\u578b\u7684\u6307\u9488\u90fd\u662f4\u4e2a\u5b57\u8282\uff0832\u4f4d\u64cd\u4f5c\u7cfb\u7edf\uff09\uff0c\u5bf9\u4e8e64\u4f4d\u64cd\u4f5c\u7cfb\u7edf\u662f8\u4e2a\u5b57\u8282\u3002<br \/>\nC\u8bed\u8a00\u4e3a\u4e86\u65b9\u4fbf\u6307\u9488\u8fd0\u7b97, \u5b9a\u4e49\u5404\u79cd\u57fa\u672c\u7c7b\u578b\u7684\u6307\u9488, \u6bcf\u79cd\u7c7b\u578b\u7684\u6307\u9488\u8fd0\u7b97\u65f6\u6240\u504f\u79fb\u91cf\u7684\u503c\u662f\u6839\u636e\u7c7b\u578b\u7684\u957f\u5ea6\u51b3\u5b9a\u7684<br \/>\n+1 \u79fb\u52a8\u7684\u662f\u4e00\u4e2a\u5355\u4f4d<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E6%8C%87%E9%92%88%E8%BF%90%E7%AE%97\"><\/span>\u6307\u9488\u8fd0\u7b97<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"1_%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%92%8C%E6%8C%87%E9%92%88%E6%89%80%E6%8C%87%E5%90%91%E7%9A%84%E7%B1%BB%E5%9E%8B%E4%B8%8D%E4%B8%80%E8%87%B4%E6%97%B6%EF%BC%8C%E8%A6%81%E6%B3%A8%E6%84%8F%E7%9A%84%E4%BD%BF%E7%94%A8\"><\/span>1. \u6307\u9488\u7c7b\u578b\u548c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6\uff0c\u8981\u6ce8\u610f++\u7684\u4f7f\u7528<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u5982\u679cptr\u6307\u9488\u7c7b\u578b\u58f0\u660e\u4e3achar *\uff0cptr++\u4e4b\u540e\u7684\u6253\u5370\u7ed3\u679c\u4e3ab\u3002<\/p>\n<pre><code>    #include &quot;stdafx.h&quot;    \n    #include &lt;stdlib.h&gt; \n\n    int _tmain(int argc, _TCHAR* argv[])\n    {\n        char a[20]={&#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;d&#039;,&#039;e&#039;,&#039;f&#039;};  \n        char *ptr= a; \/\/\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u5e76\u4e0d\u4f1a\u6539\u53d8a \u7684\u7c7b\u578b  \n        ptr++; \n\n        printf(&quot;%c&quot;,*ptr);\n        system(&quot;pause&quot;);\n        return 0;\n    }<\/code><\/pre>\n<p>\u5982\u679cptr\u6307\u9488\u7c7b\u578b\u58f0\u660e\u4e3aint *\uff0cptr++\u4e4b\u540e\u7684\u6253\u5370\u7ed3\u679c\u4e3ae\u3002 <\/p>\n<pre><code>   #include &quot;stdafx.h&quot;\n    #include &lt;stdlib.h&gt; \n\n    int _tmain(int argc, _TCHAR* argv[])\n    {\n        char a[20]={&#039;a&#039;,&#039;b&#039;,&#039;c&#039;,&#039;d&#039;,&#039;e&#039;,&#039;f&#039;};  \n        int *ptr=(int *)a; \/\/\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u5e76\u4e0d\u4f1a\u6539\u53d8a \u7684\u7c7b\u578b  \n        ptr++; \n\n        printf(&quot;%c&quot;,*ptr);\n        system(&quot;pause&quot;);\n        return 0;\n    }<\/code><\/pre>\n<p>\u6240\u4ee5<strong>\u5f53\u6307\u9488\u58f0\u660e\u6210\u4e0d\u540c\u7684\u7c7b\u578b\uff0c++\u7684\u6548\u679c\u662f\u4e0d\u4e00\u6837\u7684\u3002++\u548c\u6307\u9488\u7684\u7c7b\u578b\u6709\u5173<\/strong>\u3002<br \/>\n\u5982\u679c<strong>\u6307\u9488\u7c7b\u578b<\/strong>\u548c<strong>\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b<\/strong>\u4e0d\u4e00\u81f4\u65f6\uff0c\u8981\u6ce8\u610f++\u7684\u4f7f\u7528\u3002<\/p>\n<h4><span class=\"ez-toc-section\" id=\"2_%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%92%8C%E6%8C%87%E9%92%88%E6%89%80%E6%8C%87%E5%90%91%E7%9A%84%E7%B1%BB%E5%9E%8B%E4%B8%8D%E4%B8%80%E8%87%B4%E6%97%B6%EF%BC%8C%E5%BC%BA%E8%BD%AC%E5%90%8E%E8%BE%93%E5%87%BA%E7%9A%84%E9%97%AE%E9%A2%98%E3%80%82\"><\/span>2. \u6307\u9488\u7c7b\u578b\u548c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u4e0d\u4e00\u81f4\u65f6\uff0c\u5f3a\u8f6c\u540e\u8f93\u51fa\u7684\u95ee\u9898\u3002<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code>int test04_01()\n{\n    char a[20]=&quot;You_are_a_girl&quot;;\n    int *ptr=(int *)a;\n    ptr+=1;\n    printf(&quot;%d\\n&quot;,*ptr);\n    printf(&quot;%c\\n&quot;,*ptr);\n    system(&quot;pause&quot;);\n    return 0;\n}<\/code><\/pre>\n<p>\u4e0a\u9762\u7684\u65b9\u6cd5\u8f93\u51fa\uff1a<br \/>\n1600483937<br \/>\na<\/p>\n<pre><code>int test04_02()\n{\n    char a = &#039;a&#039;;\n    char * ptr = &amp;a;\n    printf(&quot;%d\\n&quot;,*ptr);\n    printf(&quot;%c\\n&quot;,*ptr);\n    system(&quot;pause&quot;);\n    return 0;\n}<\/code><\/pre>\n<p>\u4e0a\u9762\u7684\u65b9\u6cd5\u8f93\u51fa\uff1a<br \/>\n97<br \/>\na<\/p>\n<p>\u4e0a\u9762\u7684\u4e24\u4e2a\u65b9\u6cd5\u770b\u4f3c\u90fd\u662f\u540c\u6837\u8f93\u51fa\u5b57\u7b26'a'\uff0c\u4f46\u662f\u5b9e\u9645\u4f7f\u7528%d\u8f93\u51fa\u7684\u7ed3\u679c\u5b8c\u5168\u4e0d\u4e00\u6837\u3002\u8fd9\u662f\u4e3a\u5565\uff0c\u8bf7\u9ad8\u624b\u89e3\u7b54\uff1f<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5%E6%8C%87%E9%92%88%E4%B8%8E%E5%90%84%E7%A7%8D%E6%95%B0%E6%8D%AE%E7%B1%BB%E5%9E%8B%E7%9A%84%E5%85%B3%E7%B3%BB\"><\/span>5.\u6307\u9488\u4e0e\u5404\u79cd\u6570\u636e\u7c7b\u578b\u7684\u5173\u7cfb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h2><span class=\"ez-toc-section\" id=\"5-1%E6%95%B0%E7%BB%84%E4%B8%8E%E6%8C%87%E9%92%88\"><\/span>5-1.\u6570\u7ec4\u4e0e\u6307\u9488<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u6570\u7ec4\u540d\u5c31\u662f\u6307\u9488\uff0c\u4ee3\u8868\u6570\u7ec4\u7684\u9996\u5730\u5740\u3002\u53ef\u4ee5\u91c7\u7528\u5730\u5740\u6765\u904d\u5386\u6570\u7ec4<\/p>\n<h3><span class=\"ez-toc-section\" id=\"1%E6%95%B0%E7%BB%84%E5%90%8D%E6%98%AF%E4%B8%80%E4%B8%AA%E6%8C%87%E9%92%88%EF%BC%8C%E4%BD%86%E6%98%AF%E4%B8%8D%E6%98%AF%E4%B8%80%E4%B8%AA%E5%8F%98%E9%87%8F%E3%80%82%E4%B8%8D%E5%8F%AF%E8%83%BD%E5%AF%B9%E5%AE%83%E8%BF%9B%E8%A1%8C%E8%BF%90%E7%AE%97%E3%80%82%E4%B8%8D%E5%8F%AF%E4%BD%BF%E7%94%A8%E5%9C%A8%E5%B8%B8%E9%87%8F%E4%B8%8A\"><\/span>1.\u6570\u7ec4\u540d\u662f\u4e00\u4e2a\u6307\u9488\uff0c\u4f46\u662f\u4e0d\u662f\u4e00\u4e2a\u53d8\u91cf\u3002\u4e0d\u53ef\u80fd\u5bf9\u5b83\u8fdb\u884c++\u8fd0\u7b97\u3002++\u4e0d\u53ef\u4f7f\u7528\u5728\u5e38\u91cf\u4e0a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>  #include &quot;stdafx.h&quot;    \n    #include &lt;stdlib.h&gt; \n\n    int _tmain(int argc, _TCHAR* argv[])\n    {\n    int array[10]={0,1,2,3,4,5,6,7,8,9},value;  \n    array++;\n    value=*array; \n\n        printf(&quot;%d\\n&quot;,value); \n        system(&quot;pause&quot;);\n        return 0;\n    }<\/code><\/pre>\n<p>\u5728codeblocks\u4e0a\u7f16\u8bd1\u5c31\u4f1a\u62a5\u9519\uff1aerror: lvalue required as increment operand\uff0c\u9519\u8bef\u89e3\u91ca\uff1a<br \/>\n<a href=\"https:\/\/blog.csdn.net\/hou09tian\/article\/details\/75332576\">https:\/\/blog.csdn.net\/hou09tian\/article\/details\/75332576<\/a> \uff08\u53d8\u91cf\u662f\u5de6\u503c\uff0c\u5e38\u91cf\u662f\u53f3\u503c\u3002\uff09<\/p>\n<p>\u5bf9\u4ee3\u7801\u505a\u4e00\u4e0b\u6539\u52a8\uff0c\u7528\u6307\u9488\u6307\u5411\u6570\u7ec4\u540e\uff0c\u518d\u5bf9\u6307\u9488\u8fdb\u884c++\u8fd0\u7b97\uff0c\u800c\u975e\u76f4\u63a5\u5bf9\u6570\u7ec4\u8fdb\u884c\u8fd0\u7b97\u3002<\/p>\n<pre><code> int _tmain(int argc, _TCHAR* argv[])    \n    {\n    int array[10]={0,1,2,3,4,5,6,7,8,9},value;  \n    int *ptr = array;\n    ptr++;\n    value=*ptr; \n\n        printf(&quot;%d\\n&quot;,value); \n        system(&quot;pause&quot;);\n        return 0;\n    }<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"2%E5%A6%82%E4%BD%95%E5%88%A9%E7%94%A8%E6%8C%87%E5%90%91%E6%95%B0%E7%BB%84%E7%9A%84%E6%8C%87%E9%92%88%E5%BE%97%E5%88%B0%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0%E4%B8%AA%E6%95%B0%EF%BC%9F\"><\/span>2.\u5982\u4f55\u5229\u7528\u6307\u5411\u6570\u7ec4\u7684\u6307\u9488\u5f97\u5230\u6570\u7ec4\u5143\u7d20\u4e2a\u6570\uff1f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/www.cnblogs.com\/jieliujas\/p\/8822193.html\">https:\/\/www.cnblogs.com\/jieliujas\/p\/8822193.html<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2%E6%95%B0%E7%BB%84%E5%85%83%E7%B4%A0%E7%9A%84%E5%86%85%E5%AD%98%E5%9C%B0%E5%9D%80%E6%98%AF%E8%BF%9E%E7%BB%AD%E7%9A%84\"><\/span>2.\u6570\u7ec4\u5143\u7d20\u7684\u5185\u5b58\u5730\u5740\u662f\u8fde\u7eed\u7684<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>for(int i = 0; i &lt; 10; i++){\n    printf(&quot;array[%d] address = %d\\n&quot;,i,&amp;array[i]); \n }<\/code><\/pre>\n<p><img src=\"http:\/\/122.152.205.50\/wordpress_it\/wp-content\/uploads\/2020\/05\/1111.png\" alt=\"img\" \/><\/p>\n<h3><span class=\"ez-toc-section\" id=\"3%E6%95%B0%E7%BB%84%E4%B8%8E%E6%8C%87%E9%92%88%E7%9A%84%E7%9B%B8%E4%BA%92%E8%A1%A8%E7%A4%BA\"><\/span>3.\u6570\u7ec4\u4e0e\u6307\u9488\u7684\u76f8\u4e92\u8868\u793a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u5728C\u8bed\u8a00\u4e2d\uff0c\u6211\u4eec\u80fd \u591f\u7528\u6570\u7ec4\u8868\u793a\u6cd5\u6765\u5f15\u7528\u6307\u9488\uff0c\u540c\u65f6\u6211\u4eec\u4e5f\u80fd\u7528\u6307\u9488\u8868\u793a\u6cd5\u6765\u5f15\u7528\u6570\u7ec4\u5143\u7d20\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5-2%E5%AD%97%E7%AC%A6%E4%B8%B2%E4%B8%8E%E6%8C%87%E9%92%88\"><\/span>5-2.\u5b57\u7b26\u4e32\u4e0e\u6307\u9488<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1%EF%BC%89%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%98%AF%E5%B8%B8%E9%87%8F%E6%95%B0%E7%BB%84\"><\/span>1\uff09\u5b57\u7b26\u4e32\u662f\u5e38\u91cf\u6570\u7ec4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u5b57\u7b26\u4e32\u76f8\u5f53\u4e8e\u662f\u4e00\u4e2a\u6570\u7ec4,\u5728\u5185\u5b58\u4e2d\u4ee5\u6570\u7ec4\u7684\u5f62\u5f0f\u50a8\u5b58,\u53ea\u4e0d\u8fc7\u5b57\u7b26\u4e32\u662f\u4e00\u4e2a\u6570\u7ec4\u5e38\u91cf,\u5185\u5bb9\u4e0d\u53ef\u6539\u53d8,\u4e14\u53ea\u80fd\u662f\u53f3\u503c.\u5982\u679c\u770b\u6210\u6307\u9488\u7684\u8bdd,\u4ed6\u5373\u662f\u5e38\u91cf\u6307\u9488,\u4e5f\u662f\u6307\u9488\u5e38\u91cf<\/p>\n<h3><span class=\"ez-toc-section\" id=\"2%EF%BC%89%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E5%88%9B%E5%BB%BA%E5%BD%A2%E5%BC%8F\"><\/span>2\uff09\u5b57\u7b26\u4e32\u7684\u521b\u5efa\u5f62\u5f0f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u5176\u5b9e\u5b57\u7b26\u4e32\u6709\u591a\u79cd\u521b\u5efa\u5f62\u5f0f\uff1a<br \/>\n<a href=\"https:\/\/blog.csdn.net\/u013812502\/article\/details\/81196367\">https:\/\/blog.csdn.net\/u013812502\/article\/details\/81196367<\/a><br \/>\n1\uff09\u76f4\u63a5\u5b9a\u4e49\u5b57\u7b26\u6570\u7ec4<br \/>\nchar str[] = &quot;hello world&quot;;<em>\/\/\u5b9a\u4e49\u4e00\u4e2a\u5b57\u7b26\u6570\u7ec4<\/em><br \/>\nchar <em>p = str;<\/em>\/\/\u5b9a\u4e49\u4e00\u4e2a\u6307\u9488\u53d8\u91cf\uff0c\u91cc\u9762\u5b58\u653e\u5b57\u7b26\u6570\u7ec4\u7684\u9996\u5730\u5740<em><br \/>\n2\uff09 \u76f4\u63a5\u5b57\u7b26\u6307\u9488\u6307\u5411\u5b57\u7b26\u4e32\u5e38\u91cf<br \/>\nchar <\/em>str = &quot;www.dotcpp.com&quot; ;<br \/>\n\u5b57\u7b26\u6307\u9488\u53ef\u4ee5\u91c7\u7528\u5b57\u7b26\u4e32\u5e38\u91cf\u6765\u521d\u59cb\u5316<br \/>\n\u5b57\u7b26\u4e32\u6307\u9488\u6307\u5411\u5b57\u7b26\u4e32\u5e38\u91cf\u7684\u9996\u5730\u5740\uff0c*str\u6253\u5370\u51fa\u6765\u662fw\uff0c\u5e76\u4e0d\u662f\u6574\u4e2a\u5b57\u7b26\u4e32\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3%EF%BC%89%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E6%89%93%E5%8D%B0\"><\/span>3\uff09\u5b57\u7b26\u4e32\u7684\u6253\u5370<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>char *ptr = &quot;www.dotcpp.com&quot; ;<br \/>\nprintf(&quot;%s&quot;, ptr ); \/\/\u4f1a\u6253\u5370\u6574\u4e2a\u5b57\u7b26\u4e32<br \/>\nprintf(&quot;%c&quot;, ptr ); \/\/\u6253\u5370\u7684\u4e0d\u662fw\uff0c\u53ef\u80fd\u662f\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"5-3%E5%87%BD%E6%95%B0%E4%B8%8E%E6%8C%87%E9%92%88\"><\/span>5-3.\u51fd\u6570\u4e0e\u6307\u9488<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"1%EF%BC%89_strcpy%E5%87%BD%E6%95%B0\"><\/span>1\uff09 strcpy\u51fd\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>strcpy\u51fd\u6570\uff0c\u4f1a\u5c06char *\u6307\u9488\u6240\u6307\u5411\u7684\u5b57\u7b26\u4e32\u590d\u5236\uff0c\u800c\u4e0d\u4ec5\u4ec5\u662f\u4e00\u4e2a\u5b57\u7b26\u3002 \u53c2\u7167strcpy\u6e90\u7801\uff1a<br \/>\n<a href=\"https:\/\/blog.csdn.net\/okawari_richi\/article\/details\/57411796\">https:\/\/blog.csdn.net\/okawari_richi\/article\/details\/57411796<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2%EF%BC%89_printf%E5%87%BD%E6%95%B0\"><\/span>2\uff09 printf\u51fd\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>printf(\u201c%s\u201d,array);  %s\u662f\u4ece\u8d77\u59cb\u4f4d\u7f6e\u8f93\u51fa\u5b57\u7b26\u76f4\u5230\u9047\u5230\\0\u4e3a\u6b62\uff0c\u6240\u4ee5%s\u8f93\u51fachar[]\u6570\u7ec4\uff0c\u4f1a\u8f93\u51fa\u6574\u4e2a\u4e32\u3002<\/p>\n<p>\u5bf9\u4e8e printf(&quot;%s&quot;\uff0c\u6307\u9488\u53d8\u91cf\uff09\uff0c\u6253\u5370\u662f\u6307\u9488\u53d8\u91cf<strong>\u6240\u6307\u5411<\/strong>\u7684\u5185\u5bb9\u3002\u53ea\u6709\u5b57\u7b26\u4e32\u662f\u4e2a\u7279\u4f8b\u4e0d\u7528\u52a0<em>\u6307\u9488\u53d8\u91cf\uff0c\u5c31\u80fd\u6253\u5370\u5185\u5bb9\u3002\u5bf9\u4e8e\u5176\u4ed6\u7684\uff0c\u5982\u679c\u6307\u9488\u53d8\u91cf\u6307\u5411\u7684\u4e0d\u662f\u5b57\u7b26\u4e32\uff0c\u5219\u6253\u5370\u5185\u5bb9\u5fc5\u987b\u52a0\u4e0a<\/em>\uff0c\u5373 <strong>printf(&quot;%\u7c7b\u578b&quot;\uff0c*\u6307\u9488\u53d8\u91cf\uff09<\/strong> \u3002<\/p>\n<p>\u5bf9\u4e8e printf(&quot;%d&quot;\uff0c\u6307\u9488\u53d8\u91cf\uff09 \u3001 printf(&quot;%p&quot;\uff0c\u6307\u9488\u53d8\u91cf\uff09 \u3001 printf(&quot;%x&quot;\uff0c\u6307\u9488\u53d8\u91cf\uff09\u7b49\uff0c\u5219\u662f\u6253\u5370\u7684\u6307\u9488\u53d8\u91cf<strong>\u6240\u6307\u5411<\/strong>\u7684\u5185\u5b58\u5730\u5740\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"3sizeof%E5%87%BD%E6%95%B0\"><\/span>3.sizeof\u51fd\u6570<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>sizeof(\u5bf9\u8c61)\u6d4b\u51fa\u7684\u90fd\u662f\u5bf9\u8c61\u81ea\u8eab\u7684\u7c7b\u578b\u7684\u5927\u5c0f\uff0c\u800c\u4e0d\u662f\u522b\u7684\u4ec0\u4e48\u7c7b\u578b\u7684\u5927\u5c0f\u3002<br \/>\nsizeof(\u6307\u9488\u540d\u79f0)\u6d4b\u51fa\u7684\u7a76\u7adf\u662f\u6307\u9488\u81ea\u8eab\u7c7b\u578b\u7684\u5927\u5c0f\u800c\u975e\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u7684\u5927\u5c0f<\/p>\n<h3><span class=\"ez-toc-section\" id=\"4C%E8%AF%AD%E8%A8%80%E4%B8%AD%E5%87%BD%E6%95%B0%E8%BF%94%E5%9B%9E%E7%9A%84%E5%AD%97%E7%AC%A6%E6%95%B0%E7%BB%84%E4%B8%BAnull-%E5%87%BD%E6%95%B0%E4%B8%AD%E7%9A%84%E5%B1%80%E9%83%A8%E5%AD%97%E7%AC%A6%E6%95%B0%E7%BB%84\"><\/span>4.C\u8bed\u8a00\u4e2d\u51fd\u6570\u8fd4\u56de\u7684\u5b57\u7b26\u6570\u7ec4\u4e3anull\u2014\u2014\u51fd\u6570\u4e2d\u7684\u5c40\u90e8\u5b57\u7b26\u6570\u7ec4<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/blog.csdn.net\/weixin_44003177\/article\/details\/118864102\">https:\/\/blog.csdn.net\/weixin_44003177\/article\/details\/118864102<\/a><\/p>\n<p><img src=\"http:\/\/xinyiworld.top\/wordpress_it\/wp-content\/uploads\/2020\/05\/array.png\" alt=\"\" \/><\/p>\n<p><a href=\"https:\/\/blog.csdn.net\/earbao\/article\/details\/53401800?fps=1&amp;locationNum=2\">https:\/\/blog.csdn.net\/earbao\/article\/details\/53401800?fps=1&amp;locationNum=2<\/a><\/p>\n<h2><span class=\"ez-toc-section\" id=\"5-4%E6%8C%87%E9%92%88%E5%92%8C%E7%BB%93%E6%9E%84%E4%BD%93\"><\/span>5-4.\u6307\u9488\u548c\u7ed3\u6784\u4f53<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<pre><code> struct MyStruct \n    { \n        int a; \n        int b; \n        int c; \n    }; \n    struct MyStruct ss={20,30,40}; \n    \/\/\u58f0\u660e\u4e86\u7ed3\u6784\u5bf9\u8c61ss\uff0c\u5e76\u628ass \u7684\u6210\u5458\u521d\u59cb\u5316\u4e3a20\uff0c30 \u548c40\u3002 \n    struct MyStruct *ptr=&amp;ss; \n    \/\/\u58f0\u660e\u4e86\u4e00\u4e2a\u6307\u5411\u7ed3\u6784\u5bf9\u8c61ss \u7684\u6307\u9488\u3002\u5b83\u7684\u7c7b\u578b\u662f \n    \/\/MyStruct *,\u5b83\u6307\u5411\u7684\u7c7b\u578b\u662fMyStruct\u3002 \n    int *pstr=(int*)&amp;ss; \n    \/\/\u58f0\u660e\u4e86\u4e00\u4e2a\u6307\u5411\u7ed3\u6784\u5bf9\u8c61ss \u7684\u6307\u9488\u3002\u4f46\u662fpstr \u548c \n    \/\/\u5b83\u88ab\u6307\u5411\u7684\u7c7b\u578bptr \u662f\u4e0d\u540c\u7684\u3002 <\/code><\/pre>\n<p><strong>\u7ed3\u6784\u4f53\u6307\u9488\u7684\u8bbf\u95ee\u65b9\u5f0f<\/strong><\/p>\n<p>1.\u6307\u9488-&gt;\u6210\u5458\u6216\u8005(*\u6307\u9488).\u6210\u5458<br \/>\n\u6210\u5458\u8c03\u7528\u7684\u65b9\u6cd5\uff08-&gt;\u5de6\u8fb9\u5fc5\u987b\u662f\u6307\u9488\uff0c&quot;.&quot;\u5de6\u8fb9\u5fc5\u987b\u662f\u5b9e\u4f53\uff09<br \/>\n2.\u6307\u9488++\u8bbf\u95ee<br \/>\n2.\u7ed3\u6784\u4f53\u6307\u9488\u5f3a\u8f6c\u6210int\u6307\u9488\u518d\u8bbf\u95ee\uff08\u6b64\u79cd\u65b9\u5f0f\u4e0d\u89c4\u8303\uff09<br \/>\n\u6240\u6709\u7684C\/C++\u7f16\u8bd1\u5668\u5728\u6392\u5217\u6570\u7ec4\u7684\u5355\u5143\u65f6\uff0c\u603b\u662f\u628a\u5404\u4e2a\u6570\u7ec4\u5355\u5143\u5b58\u653e\u5728\u8fde\u7eed\u7684\u5b58\u50a8\u533a\u91cc\uff0c\u5355\u5143\u548c\u5355\u5143\u4e4b\u95f4\u6ca1\u6709\u7a7a\u9699\u3002\u4f46\u5728\u5b58\u653e\u7ed3\u6784\u5bf9\u8c61\u7684\u5404\u4e2a\u6210\u5458\u65f6\uff0c\u5728\u67d0\u79cd\u7f16\u8bd1\u73af\u5883\u4e0b\uff0c\u53ef\u80fd\u4f1a\u9700\u8981\u5b57\u5bf9\u9f50\u6216\u53cc\u5b57\u5bf9\u9f50\u6216\u8005\u662f\u522b\u7684\u4ec0\u4e48\u5bf9\u9f50\uff0c\u9700\u8981\u5728\u76f8\u90bb\u4e24\u4e2a\u6210\u5458\u4e4b\u95f4\u52a0\u82e5\u5e72\u4e2a&quot;\u586b\u5145\u5b57\u8282&quot;\uff0c\u8fd9\u5c31\u5bfc\u81f4\u5404\u4e2a\u6210\u5458\u4e4b\u95f4\u53ef\u80fd\u4f1a\u6709\u82e5\u5e72\u4e2a\u5b57\u8282\u7684\u7a7a\u9699\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%80%E4%B8%AA%E9%A2%A0%E8%A6%86%E4%B8%89%E8%A7%82%E7%9A%84%E5%AE%9E%E9%AA%8C\"><\/span>\u4e00\u4e2a\u98a0\u8986\u4e09\u89c2\u7684\u5b9e\u9a8c<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>struct MyStruct ss={20,&#039;a&#039;,50};<\/code><\/pre>\n<p>\u5982\u679c\u5c06MyStruct\u7684\u6210\u5458b\u5b9a\u4e49\u4e3achar\u7c7b\u578b\uff0c\u521d\u59cb\u5316\u4e3a'a'\uff0c\u901a\u8fc7<em>(pstr+1)\u6216\u8005<\/em>(pstr+1)\u8bbf\u95ee\uff0c<br \/>\n\u901a\u8fc7printf %d\u6216\u8005%c\u6253\u5370\uff0c\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u3001\u4e0d\u540c\u7684\u7f16\u8bd1\u5668\u4e0a\u51fa\u7684\u7ed3\u679c\u4e94\u82b1\u516b\u95e8\uff0c\u6709\u7684\u7adf\u7136\u8fd8\u662f\u6b63\u786e\u7684\u3002<\/p>\n<p>\u6240\u4ee5\u6211\u5f97\u51fa\u4e00\u4e2a\u7ed3\u8bba\uff1a\u6570\u7ec4\u540d\u4e0e\u7ed3\u6784\u4f53\u540d\u6709\u5b8c\u5168\u4e0d\u4e00\u6837\u7684\u7279\u6027\uff0c<strong>\u7ed3\u6784\u4f53\u540d\u4e0d\u80fd\u5f53\u6210\u6307\u9488\u4f7f\u7528\uff0c\u7ed3\u6784\u4f53\u540d\u4e0d\u662f\u6307\u9488\u5e38\u91cf<\/strong>\u3002<\/p>\n<p>\u5173\u4e8e\u7ed3\u6784\u4f53\u6307\u9488\u7684\u66f4\u591a\u8be6\u60c5\uff0c\u53ef\u4ee5\u53c2\u7167\u6211\u53e6\u5916\u4e00\u7bc7\u535a\u5ba2\uff1a<a href=\"https:\/\/blog.51cto.com\/4259297\/2316321\">https:\/\/blog.51cto.com\/4259297\/2316321<\/a><\/p>\n<p>------------------------------------------------------------------<\/p>\n<p>\uff5c  <strong>\u7ed3\u6784\u4f53\u4e0e\u6570\u7ec4\u7684\u5171\u6027<\/strong>\uff1a<\/p>\n<p>\uff5c    1\uff09\u7ed3\u6784\u4f53\u5b9e\u4f53\u7684\u5730\u5740\u548c\u7ed3\u6784\u4f53\u7b2c\u4e00\u4e2a\u5143\u7d20\u7684\u5730\u5740\u4e00\u6837\uff0c \u5404\u5143\u7d20\u7684\u5730\u5740\u4e5f\u662f\u8fde\u7eed\u7684\u3002(\u7279\u6b8a\u60c5\u51b5\u4e5f\u6709\u4e0d\u8fde\u7eed\u7684)<\/p>\n<p>\uff5c       \u6570\u7ec4\u5b9e\u4f53\u7684\u5730\u5740\u548c\u6570\u7ec4\u7b2c\u4e00\u4e2a\u5143\u7d20\u7684\u5730\u5740\u4e00\u6837\uff0c \u5404\u5143\u7d20\u7684\u5730\u5740\u4e5f\u662f\u8fde\u7eed\u7684\u3002<\/p>\n<p>\uff5c    2\uff09\u6570\u7ec4\u548c\u7ed3\u6784\u4f53\u81ea\u8eab\u7684\u5b9e\u4f53\uff08\u53d8\u91cf\uff09\u5e76\u4e0d\u5360\u636e\u72ec\u7acb\u7684\u5185\u5b58\uff08\u548c\u9996\u5143\u7d20\u5730\u5740\u4e00\u6837\uff09\uff0c\u53ea\u6709\u5143\u7d20\u624d\u5360\u7528\u771f\u6b63\u7684\u5185\u5b58\u5730\u5740\uff0c<\/p>\n<p>\uff5c       \u5b83\u53ea\u662f\u6807\u660e\u81ea\u8eab\u7684\u5143\u7d20\u662f\u4e00\u7ec4\u7279\u6b8a\u7684\u6570\u636e\u7ed3\u6784\uff0c \u901a\u8fc7\u5b9e\u4f53\u5c01\u88c5\uff0c\u4fbf\u4e8e\u5143\u7d20\u7684\u8bbf\u95ee\u3002<\/p>\n<p>\u200b    |  <\/p>\n<p>\uff5c <strong>\u7ed3\u6784\u4f53\u4e0e\u6570\u7ec4\u7684\u533a\u522b<\/strong>\uff1a<\/p>\n<p>\uff5c    1\uff09\u6570\u7ec4\u540d\u662f\u6307\u9488\u5e38\u91cf\uff0c\u4f46\u662f\u7ed3\u6784\u4f53\u540d\u548c\u6307\u9488\u6ca1\u6709\u4efb\u4f55\u7684\u5173\u7cfb\u3002<\/p>\n<p>---------------------------------------------------------------  <\/p>\n<h2><span class=\"ez-toc-section\" id=\"6%E5%A4%9A%E7%BA%A7%E6%8C%87%E9%92%88\"><\/span>6.\u591a\u7ea7\u6307\u9488<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5728\u4e00\u79cd\u6570\u636e\u7c7b\u578b\uff08\u975e\u6307\u9488\u7c7b\u578b\uff09\u7684\u540e\u9762 \u6709\u51e0\u4e2a* \u5c31\u4ee3\u8868\u51e0\u7ea7\u6307\u9488<\/p>\n<p>int *p \uff1ap\u8868\u793a\u6307\u5411int\u578b\u7684\u6307\u9488\uff0c\u662f\u4e00\u7ea7\u6307\u9488\u3002<br \/>\nint *<em>p: p\u8868\u793a\u6307\u5411int <\/em>(\u6307\u9488)\u7684\u6307\u9488\uff0c\u5373\u6307\u5411\u6307\u9488\u7684\u6307\u9488\uff0c\u662f\u4e8c\u7ea7\u6307\u9488\u3002p\u6307\u5411\u7684\u6570\u636e\u7c7b\u578b\u4e3aint *\u6307\u9488\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"1%E4%BA%8C%E7%BA%A7%E6%8C%87%E9%92%88%E7%A4%BA%E4%BE%8B1\"><\/span>1)\u4e8c\u7ea7\u6307\u9488\u793a\u4f8b1<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>int test05()\n    {\n          char a[20]=&quot;You_are_a_girl&quot;;\n            char *p=a;\n            char **ptr=&amp;p;\n            printf(&quot;**ptr=%c\\n&quot;,**ptr);\n            ptr++;\n            printf(&quot;**ptr=%c\\n&quot;,**ptr);\n        system(&quot;pause&quot;);\n        return 0;\n   }<\/code><\/pre>\n<p>\u4e0a\u9762\u8f93\u51fa\u7ed3\u679c\uff1a<br \/>\n<strong>ptr=Y<br \/>\n<\/strong>ptr=?<\/p>\n<p>\u4e0d\u61c2\u6307\u9488\u7684\u4eba\u53ef\u80fd\u5c31\u4f1a\u8bef\u4ee5\u4e3a\u7b2c\u4e8c\u6b21ptr\u4f1a\u8f93\u51fa'o'\uff0c\u4e5f\u5c31\u662f\u6570\u7ec4a\u7684\u7b2c\u4e8c\u4e2a\u5143\u7d20\u3002\u4e0b\u9762\u5c31\u7528\u6307\u9488\u5185\u5b58\u56fe\u89e3\u91ca\u4e00\u4e0b\uff1a<\/p>\n<p><img src=\"http:\/\/122.152.205.50\/wordpress_it\/wp-content\/uploads\/2020\/05\/222.png\" alt=\"img\" \/>\u4e8c\u7ea7\u6307\u9488\u793a\u610f\u56fe<\/p>\n<p>*<em>ptr:\u5206\u89e3\u5f00\u5c31\u662f<\/em>(*ptr)<\/p>\n<p>*ptr\u53d6\u6307ptr\u6240\u6307\u5411\u7684\u5185\u5bb9\uff0cptr\u6307\u5411\u7684\u5730\u5740\u662f\u6307\u9488\u53d8\u91cfp\u6240\u5360\u7528\u7684\u5185\u5b58\u5730\u5740\uff0cptr\u6240\u6307\u5411\u7684\u5185\u5bb9\u5c31\u662f\u6307\u9488p\u53d8\u91cf\u3002<\/p>\n<p><em>(<\/em>ptr) \u5c31\u662f*p\uff0c\u4e5f\u5c31\u662f\u53d6p\u6240\u6307\u5411\u7684a\u7684\u9996\u5730\u5740\u7684\u503c\uff0c\u6240\u4ee5\u7b2c\u4e00\u6b21\u6253\u5370ptr\u7684\u503c\u662fY\u3002<\/p>\n<p>ptr++\uff0c\u5c31\u662f\u5f97\u660e\u767d\u6307\u9488\u7684++\u4e0e\u666e\u901a\u7684\u8fd0\u7b97\u7b26\u662f\u4e0d\u4e00\u6837\u7684\uff08\u6307\u9488\u53d8\u91cf\u7684++\uff0c\u4ee3\u8868\u5b83\u6240\u6307\u5411\u7684\u4e2a\u4f53\u7684\u5185\u5b58\u5730\u5740\u7684\u9012\u589e\uff0c\u4e14\u589e\u957f\u5355\u4f4d\u4e3a\u6307\u9488\u7c7b\u578b\u6240\u5360\u5b57\u8282\u4e2a\u6570\uff09\u3002<\/p>\n<p>ptr++\uff0c\u4e5f\u5c31\u662f ptr\u6240\u6307\u5411\u7684\u5730\u5740+4\uff08\u6ce8\u610f\u662fp\u7684\u5730\u5740+4\uff0c\u5e76\u975ea\u7684\u5730\u5740+4\uff09.<\/p>\n<p>ptr++ , \u5c31\u662fptr\u6240\u6307\u5411\u7684\u5185\u5b58\u5730\u5740\u662f\u6307\u9488p\u7684\u5185\u5b58\u5730\u5740\u52a04\u4e2a\u5b57\u8282\u7684\u5730\u5740\uff0c\u81f3\u4e8e\u8fd9\u4e2a\u5730\u5740\u91cc\u5b58\u50a8\u7684\u5bf9\u8c61\u662f\u5565\uff0c\u8c01\u4e5f\u4e0d\u77e5\u9053\u3002<\/p>\n<p><em>ptr\uff0cptr\u65b0\u6307\u5411\u5185\u5b58\u5730\u5740\u5c31\u662f\u4e0b\u9762\u7684\u8fd9\u4e2a\u84dd\u7259\u6846\u3002 <\/em>(<em>ptr)\uff0c\u5c31\u662f\u628a<\/em>ptr\u5f53\u4f5c\u662f\u4e00\u4e2a\u6307\u9488\uff0c\u800c*ptr\u5e76\u975e\u4e00\u5b9a\u662f\u4e00\u4e2a\u6307\u9488\u3002\u8fd9\u6837\u7a0b\u5e8f\u53ef\u80fd\u5c31\u4f1a\u62a5\u9519\u3002<\/p>\n<p><img src=\"http:\/\/122.152.205.50\/wordpress_it\/wp-content\/uploads\/2020\/05\/333.png\" alt=\"img\" \/>\u6307\u9488\u9519\u8bef\u5730\u8fd0\u7b97<\/p>\n<p>\u6240\u4ee5\u8fdb\u884c\u6307\u9488\u8fd0\u7b97\u7684\u53d8\u91cf\u4e0d\u662fptr\uff0c\u800c\u5e94\u8be5\u662fp\uff08\u4e5f\u5c31\u662f*ptr\uff09\uff0c\u6240\u4ee5\u6b63\u786e\u6253\u5370\u7b2c\u4e8c\u4e2a\u5b57\u6bcd\u7684\u65b9\u6cd5\u5982\u4e0b\uff1a<\/p>\n<pre><code>    int test05_02()\n    {\n          char a[20]=&quot;You_are_a_girl&quot;;\n            char *p=a;\n            char **ptr=&amp;p;\n            printf(&quot;**ptr=%c\\n&quot;,**ptr);\n            (*ptr)++;\n            printf(&quot;**ptr=%c\\n&quot;,**ptr);\n        system(&quot;pause&quot;);\n        return 0;\n    }<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"7%E5%87%BD%E6%95%B0%E6%8C%87%E9%92%88\"><\/span>7.\u51fd\u6570\u6307\u9488<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u548c\u51fd\u6570\u5934\u4e00\u6837\uff0c\u5176\u5b83\u4e0d\u53d8\uff0c\u53ea\u8981\u5c06\u51fd\u6570\u540d\u6539\u4e3a(*\u51fd\u6570\u522b\u540d)\u5373\u53ef\u3002\u5982\uff1a<\/p>\n<p>\u5b9a\u4e49\u4e00\u4e2a\u51fd\u6570<br \/>\nint add(int x ,int y)<br \/>\n{<br \/>\nreturn x + y;<br \/>\n}<br \/>\n\u5b9a\u4e49\u4e0a\u9762\u8fd9\u79cd\u51fd\u6570\u7684\u6307\u9488<br \/>\nint (*func) (int x ,int y) = add;<\/p>\n<h2><span class=\"ez-toc-section\" id=\"8%E6%8C%87%E9%92%88%E7%9A%84%E5%B8%B8%E8%A7%81%E9%94%99%E8%AF%AF\"><\/span>8.\u6307\u9488\u7684\u5e38\u89c1\u9519\u8bef<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>(1) \u5b9a\u4e49\u7684\u6570\u636e\u7c7b\u578b \u8981\u548c\u4f60\u5b9a\u4e49\u7684\u6307\u9488\u7c7b\u578b\u8981\u76f8\u5bf9\u5e94<br \/>\n(2) \u6307\u9488\u53d8\u91cf\u672a\u7ecf\u8d4b\u503c \u4e0d\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528  \u91ce\u6307\u9488<br \/>\n(3) \u6307\u5411\u4e0d\u660e<br \/>\n\u770b\u4e2a\u4f8b\u5b50\uff1a<\/p>\n<pre><code class=\"language-c\">int i;\nchar *result = {&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;};\nfor (i = 0; i &lt; len; i++) {\n        printf(&quot;result[%d]=%d &quot;,i,result[i]);\n}<\/code><\/pre>\n<p>\u4e0a\u8ff0\u4ee3\u7801\u8fd0\u884c\u540e\uff0c\u63a7\u5236\u53f0\u76f4\u63a5\u62a5\u9519\uff1aProcess finished with exit code -1073741819 (0xC0000005)<\/p>\n<p>\u7136\u540e\u6539\u8fdb\u4e00\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-c\">int i;\nchar *result = {&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;};\nchar result2[16] = {&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;,&#039;*&#039;};\nresult = result2;\nfor (i = 0; i &lt; len; i++) {\n   printf(&quot;result[%d]=%d &quot;,i,result[i]);\n}<\/code><\/pre>\n<p>\u4ee3\u7801\u6b63\u5e38\u8fd0\u884c\u8f93\u51fa\uff0c\u7136\u540e\u518d\u6539\u52a8\u4e00\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre><code class=\"language-c\">int i;\nchar * result = malloc(len*sizeof(char));\nfor (i = 0; i &lt; len; i++) {\n   result[i] = &#039;*&#039;;\n   printf(&quot;result[%d]=%d &quot;,i,result[i]);\n}<\/code><\/pre>\n<p>\u4ee3\u7801\u6b63\u5e38\u8fd0\u884c\u8f93\u51fa<br \/>\n\u6240\u4ee5\u4f7f\u7528<code>char *result = {}<\/code>\u8fd9\u53e5\u4ee3\u7801\u662f\u6709\u95ee\u9898\u7684\uff0c\u6307\u9488\u6307\u5411\u7684\u5e76\u4e14\u662f\u4e00\u4e2a\u6570\u7ec4\uff0c\u5f15\u7528\u6307\u9488\u5c31\u4f1a\u62a5\u9519\u3002<br \/>\n\uff084\uff09\u6307\u9488\u5f3a\u8f6c<br \/>\n<a href=\"https:\/\/www.it1352.com\/728643.html\">https:\/\/www.it1352.com\/728643.html<\/a><br \/>\n<code>char *to = dest; \/\/ dest\u662f void * \u7c7b\u578b <\/code>\u5728c++\u7f16\u8bd1\u4f1a\u62a5\u9519<code>error: cannot initialize a variable of type 'char *' with an lvalue of type 'void *'<code>\uff0c\u901a\u8fc7\u663e\u793a\u8f6c\u6362<\/code>char* to=(char*)dest;<\/code><\/p>\n<h2><span class=\"ez-toc-section\" id=\"9%E6%B7%B1%E5%85%A5%E7%90%86%E8%A7%A3%E6%8C%87%E9%92%88\"><\/span>9.\u6df1\u5165\u7406\u89e3\u6307\u9488<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img src=\"http:\/\/122.152.205.50\/wordpress_it\/wp-content\/uploads\/2020\/05\/4444.png\" alt=\"img\" \/><\/p>\n<p>&amp;i:\u8868\u793a\u53d6\u53d8\u91cfi\u7684\u5185\u5b58\u5730\u5740<br \/>\nint<em> p = &amp;i:\u8868\u793a\u5c06\u53d8\u91cfi\u7684\u5185\u5b58\u5730\u5740\u7528int\u7c7b\u578b\u6307\u9488p\u5b58\u50a8\u8d77\u6765<br \/>\n<\/em>p:\u8868\u793a\u6307\u9488p\u6240\u6307\u5411\u7684\u5185\u5b58\u5730\u5740\u5bf9\u5e94\u7684\u53d8\u91cf\uff08\u6ce8\u610f\u4e0d\u8981\u7406\u89e3\u6210\u53d8\u91cf\u7684\u503c\uff09\uff0c\u4e5f\u5c31\u662f<em>p=<\/em>(&amp;i)=i,\u5c31\u628a*\u4e0e&amp;\u7406\u89e3\u6210\u53ef\u4ee5\u76f8\u4e92\u62b5\u6d88\u7684\u610f\u601d\uff08\u867d\u7136\u8fd9\u4e48\u7406\u89e3\u4e0d\u592a\u51c6\u786e\uff09<\/p>\n<p>\u6240\u4ee5\u5bf9\u4e8e\u4e0b\u9762\u7684&quot;\u4fee\u6539i\u7684\u503c\uff0c\u4f1a\u4e0d\u4f1a\u5f71\u54cd<em>p&quot;\u548c&quot;\u4fee\u6539<\/em>p\u7684\u503c\uff0c\u4f1a\u4e0d\u4f1a\u5f71\u54cdi&quot;\uff0c\u7b54\u6848\u662f\u4e24\u4e2a\u90fd\u4f1a\uff0c\u56e0\u4e3a*p\u5c31\u6307\u5411\u4e86i\uff0c\u5b83\u4eec\u662f\u540c\u4e00\u5757\u5185\u5b58\u5730\u5740\u3002<\/p>\n<pre><code>main()\n{\n      int i = 8;\n\n      int* p = &amp;i;  \/\/p \u662f\u7528\u6765 \u5b58\u5730\u5740 \n\n      \/\/(1)\u6211\u4fee\u6539i\u7684\u503c \u4f1a\u4e0d\u4f1a\u5f71\u54cdp\u7684\u503c   \u4e0d\u4f1a \n      \/**\n      printf(&quot;p\u7684\u503c\u4fee\u6539\u524d\u4e3a%#x\\n&quot;,p);\n       i = 100;\n      printf(&quot;p\u7684\u503c\u4fee\u6539\u540e\u4e3a%#x\\n&quot;,p);  **\/\n\n      \/\/(2)\u6211\u4fee\u6539p\u7684\u503c  \u4f1a\u4e0d\u4f1a\u5f71\u54cdi       \u4e0d\u4f1a \n      \/**\n       printf(&quot;i\u7684\u503c\u4fee\u6539\u524d\u4e3a%d\\n&quot;,i);\n       int j = 100; \n       p = &amp;j; \n       printf(&quot;i\u7684\u503c\u4fee\u6539\u540e\u4e3a%d\\n&quot;,i);  **\/\n\n      \/\/(3)\u6211\u4fee\u6539i\u7684\u503c \u4f1a\u4e0d\u4f1a\u5f71\u54cd *p      \u4f1a \n       \/**\n         printf(&quot;*p\u7684\u503c\u4fee\u6539\u524d\u4e3a%d\\n&quot;,*p);\n         i = 200; \n         printf(&quot;*p\u7684\u503c\u4fee\u6539\u540e\u4e3a%d\\n&quot;,*p); **\/\n\n      \/\/(4)\u6211\u4fee\u6539*p \u4f1a\u4e0d\u4f1a\u5f71\u54cdi           \u4f1a \n        printf(&quot;i\u7684\u503c\u4fee\u6539\u524d\u4e3a%d\\n&quot;,i);\n        *p = 100;\n\n        printf(&quot;i\u7684\u503c\u4fee\u6539\u540e\u4e3a%d\\n&quot;,i);\n      system(&quot;pause&quot;);            \/\/\u6267\u884c\u4e00\u4e2awindos\u7cfb\u7edf\u7684\u5916\u90e8\u547d\u4ee4  \u8ba9dos\u7a97\u4f53\u6682\u505c\u9000\u51fa \n}<\/code><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"10%E5%A4%8D%E6%9D%82%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%88%A4%E6%96%AD\"><\/span>10.\u590d\u6742\u6307\u9488\u7c7b\u578b\u5224\u65ad<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><a href=\"https:\/\/blog.csdn.net\/liu100m\/article\/details\/90731422\">https:\/\/blog.csdn.net\/liu100m\/article\/details\/90731422<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%A4%8D%E6%9D%82%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E5%88%A4%E6%96%AD%E7%9A%84%E5%9F%BA%E6%9C%AC%E5%8E%9F%E5%88%99\"><\/span>\u590d\u6742\u6307\u9488\u7c7b\u578b\u5224\u65ad\u7684\u57fa\u672c\u539f\u5219<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<pre><code>\u6280\u5de71\uff1a\u6ce8\u610f*\u4e0e[\u4e0e\u53d8\u91cf\u7ed3\u5408\u7684\u4f18\u5148\u987a\u5e8f\uff0cp\u6709\u53ef\u80fd\u662f\u6307\u9488\uff0c\u4e5f\u6709\u53ef\u80fd\u662f\u6570\u7ec4\uff0c\u4e5f\u6709\u53ef\u80fd\u662f\u51fd\u6570\u540d\u3002\n\n\u6280\u5de72\uff1a\u5173\u4e8e\u201c\u6307\u9488\u7c7b\u578b\u201d\u7684\u5224\u5b9a\uff1a\n\n            1\uff09\u9996\u5148\uff0c\u8981\u786e\u4fdd\u53d8\u91cf\u5c31\u662f\u4e00\u4e2a\u6307\u9488\u7c7b\u578b\u3002\n\n            2\uff09\u53bb\u6389\u53d8\u91cf\u540d\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u6307\u9488\u7c7b\u578b\u3002\n\n\u6280\u5de73\uff1a\u5173\u4e8e\u201c\u6307\u9488\u6240\u6307\u5411\u7684\u7c7b\u578b\u201d\u7684\u5224\u5b9a\uff1a\n\n            1\uff09\u9996\u5148\uff0c\u8981\u786e\u4fdd\u53d8\u91cf\u5c31\u662f\u4e00\u4e2a\u6307\u9488\u7c7b\u578b\u3002\n\n            2\uff09\u53bb\u6389\u53d8\u91cf\u540d\u6307\u9488\u7684\u58f0\u660e\u7b26*\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u6307\u9488\u6307\u5411\u7684\u7c7b\u578b\u3002<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"1_%E5%85%B3%E4%BA%8E%E3%80%90int_p3%E3%80%91%E4%B8%8E%E3%80%90int_p3%E3%80%91%E4%B8%A4%E4%B8%AA%E7%9A%84%E5%8C%BA%E5%88%AB\"><\/span>1. \u5173\u4e8e\u3010int (<em>p)[3]\u3011\u4e0e\u3010int <\/em>p[3]\u3011\u4e24\u4e2a\u7684\u533a\u522b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><a href=\"https:\/\/blog.csdn.net\/sayesan\/article\/details\/39001609\">https:\/\/blog.csdn.net\/sayesan\/article\/details\/39001609<\/a><br \/>\n<a href=\"https:\/\/blog.csdn.net\/ywb201314\/article\/details\/52062059\">https:\/\/blog.csdn.net\/ywb201314\/article\/details\/52062059<\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"2int_p3%E4%B8%8E_Int_p_int\"><\/span>2.int (<em>p)[3]\u4e0e Int (<\/em>p)( int )<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u6839\u636e\u4e0a\u9762\u7684\u5224\u65ad\u539f\u5219\uff0cint(<em>p)[3]\u4e0e int(<\/em>p)(int)\u90fd\u662f\u58f0\u660e\u7684\u6307\u9488\u53d8\u91cf\u3002<br \/>\nint(<em>p)[3] \u53bb\u6389 (<\/em>p)\u4e3a int [3] ,\u6240\u4ee5\u6307\u9488\u6307\u5411\u7684\u5730\u5740\u5b58\u50a8\u7684\u6570\u636e\u7c7b\u578b\u4e3a\u6570\u7ec4\u3002<br \/>\nint(<em>p) (int) \u53bb\u6389 (<\/em>p)\u4e3a int (int) ,\u6240\u4ee5\u6307\u9488\u6307\u5411\u7684\u5730\u5740\u5b58\u50a8\u7684\u6570\u636e\u7c7b\u578b\u4e3a\u51fd\u6570\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"11_%E6%8C%87%E9%92%88%E7%B1%BB%E5%9E%8B%E8%BD%AC%E6%8D%A2\"><\/span>11. <strong>\u6307\u9488\u7c7b\u578b\u8f6c\u6362<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u5f3a\u5236\u7c7b\u578b\u8f6c\u6362\u4e0d\u4f1a\u6539\u53d8\u771f\u5b9e \u6307\u9488\uff0c\u5b83\u4eec \u53ea\u662f\u544a\u8bc9\u7f16\u8bd1\u5668\u4ee5\u65b0\u7684\u6570\u636e\u7c7b\u578b\u6765\u770b\u5f85\u88ab\u6307\u5411\u7684\u6570\u636e<\/p>\n<h2><span class=\"ez-toc-section\" id=\"12%E6%8C%87%E9%92%88%E5%AE%89%E5%85%A8%E9%97%AE%E9%A2%98\"><\/span>12.\u6307\u9488\u5b89\u5168\u95ee\u9898<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4f7f\u7528*\u6307\u9488 = value\uff0c\u7ed9\u6307\u9488\u6240\u6307\u5411\u7684\u5185\u5b58\u533a\u57df\u8d4b\u503c\u65f6\uff0c\u5982\u679c\u8fd9\u4e2a\u6307\u5411\u7684\u5185\u5b58\u6307\u9519\u4e86\uff0c\u53ef\u80fd\u4f1a\u5c06\u4e00\u5757\u91cd\u8981\u7684\u5185\u5b58\u7684\u6570\u636e\u62b9\u6389\uff01<\/p>\n<button class=\"simplefavorite-button\" data-postid=\"125\" data-siteid=\"1\" data-groupid=\"1\" data-favoritecount=\"0\" style=\"\">\u6536\u85cf <i class=\"sf-icon-star-empty\"><\/i><\/button>","protected":false},"excerpt":{"rendered":"<p>\u76ee\u5f55 1.\u6307\u9488\u7684\u6982\u5ff52.\u6307\u9488\u53d8\u91cf\u7684\u58f0\u660e3.*\u53f7\u7684\u4e09\u79cd\u542b\u4e494.\u6307\u9488\u7684\u7c7b\u578b\u548c\u957f\u5ea6\u6307\u9488\u8fd0\u7b971. \u6307\u9488\u7c7b\u578b\u548c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[969],"tags":[],"_links":{"self":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/125"}],"collection":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=125"}],"version-history":[{"count":45,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":10689,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=\/wp\/v2\/posts\/125\/revisions\/10689"}],"wp:attachment":[{"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/xinyiworld.top\/wordpress_it\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}