{"id":230,"date":"2025-10-18T20:30:53","date_gmt":"2025-10-18T12:30:53","guid":{"rendered":"http:\/\/4.189.252.43\/?p=230"},"modified":"2025-10-18T20:30:54","modified_gmt":"2025-10-18T12:30:54","slug":"%e9%80%89%e6%8b%a9%e8%af%ad%e5%8f%a5","status":"publish","type":"post","link":"http:\/\/4.189.252.43\/index.php\/2025\/10\/18\/%e9%80%89%e6%8b%a9%e8%af%ad%e5%8f%a5\/","title":{"rendered":"\u9009\u62e9\u8bed\u53e5"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u903b\u8f91\u8868\u8fbe\u5f0f<\/h2>\n\n\n\n<p><code>i &lt; j<\/code>\u7684\u6bd4\u8f83\u4f1a\u4ea7\u751f\u4e00\u4e2a\u6574\u6570\uff1a<code>0<\/code>\uff08\u5047\uff09\u6216<code>1<\/code>\uff08\u771f\uff09<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5173\u7cfb\u8fd0\u7b97\u7b26<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7b26\u53f7<\/th><th>\u542b\u4e49<\/th><\/tr><\/thead><tbody><tr><td><code>&lt;<\/code><\/td><td>\u5c0f\u4e8e<\/td><\/tr><tr><td><code>&gt;<\/code><\/td><td>\u5927\u4e8e<\/td><\/tr><tr><td><code>&lt;=<\/code><\/td><td>\u5c0f\u4e8e\u7b49\u4e8e<\/td><\/tr><tr><td><code>&gt;=<\/code><\/td><td>\u5927\u4e8e\u7b49\u4e8e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u4f18\u5148\u7ea7\u4f4e\u4e8e\u7b97\u672f\u8fd0\u7b97\u7b26\uff1a\u200b<\/p>\n\n\n\n<p>\u6216\u200b<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u5224\u7b49\u8fd0\u7b97\u7b26<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7b26\u53f7<\/th><th>\u542b\u4e49<\/th><\/tr><\/thead><tbody><tr><td><code>==<\/code><\/td><td>\u7b49\u4e8e<\/td><\/tr><tr><td><code>!=<\/code><\/td><td>\u4e0d\u7b49\u4e8e<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u5224\u7b49\u8fd0\u7b97\u7b26\u662f\u5de6\u7ed3\u5408\u7684\uff0c\u4ea7\u751f<code>0<\/code>\uff08\u5047\uff09\u6216<code>1<\/code>\uff08\u771f\uff09\u4f5c\u4e3a\u7ed3\u679c<\/p>\n\n\n\n<p>\u5224\u7b49\u8fd0\u7b97\u7b26\u4f18\u5148\u7ea7\u4f4e\u4e8e\u5173\u7cfb\u8fd0\u7b97\u7b26\uff1a\u200b<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">\u903b\u8f91\u8fd0\u7b97\u7b26<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u7b26\u53f7<\/th><th>\u542b\u4e49<\/th><\/tr><\/thead><tbody><tr><td><code>!<\/code><\/td><td>\u903b\u8f91\u975e<\/td><\/tr><tr><td><code>&amp;&amp;<\/code><\/td><td>\u903b\u8f91\u4e0e and \u4e24\u8005\u90fd\u771f\u624d\u4e3a\u771f<\/td><\/tr><tr><td><code>||<\/code><\/td><td>\u903b\u8f91\u6216 or \u4e24\u8005\u4e4b\u4e00\u4e3a\u771f\uff0c\u5219\u4e3a\u771f<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u4ea7\u751f<code>0<\/code>\u6216<code>1<\/code>\u4f5c\u4e3a\u7ed3\u679c\uff0c\u5bf9\u4efb\u4f55\u975e\u96f6\u64cd\u4f5c\u6570\u89c6\u4e3a\u771f\u503c\uff0c\u96f6\u503c\u64cd\u4f5c\u6570\u89c6\u4e3a\u5047\u503c\u3002<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">\u77ed\u8def\u8ba1\u7b97<\/h4>\n\n\n\n<p>\u5bf9\u4e8e<code>&amp;&amp;<\/code>\u548c<code>||<\/code>\uff0c\u5148\u8ba1\u7b97\u5de6\u64cd\u4f5c\u6570\uff0c\u5982\u679c\u7ed3\u679c\u53ef\u4ee5\u5355\u72ec\u4ece\u5de6\u64cd\u4f5c\u6570\u63a8\u51fa\uff0c\u5219\u4e0d\u6267\u884c\u53f3\u64cd\u4f5c\u6570<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">int i = 1;<br>i || i++;<br>printf(\"%d\", i);<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001if\u8bed\u53e5<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">int i = 1;<br>if(i){<br> &nbsp; &nbsp;printf(\"%d\", i);<br>}<br>else printf(\"%d\", i); \/\/\u5f53\u53ea\u6709\u4e00\u6761\u8bed\u53e5\u7684\u65f6\u5019\uff0c\u53ef\u4ee5\u4e0d\u9700\u8981\u82b1\u62ec\u53f7\u3002<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001*\u6761\u4ef6\u8868\u8fbe\u5f0f<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">int value = (value &gt; new_value) ? value : new_value; <\/pre>\n\n\n\n<p><code>\u8868\u8fbe\u5f0f1 \uff1f \u8868\u8fbe\u5f0f2 \uff1a \u8868\u8fbe\u5f0f3<\/code><\/p>\n\n\n\n<p>\u5982\u679c\u8868\u8fbe\u5f0f1\u4e3a\u771f\uff0c\u8fd4\u56de\u8868\u8fbe\u5f0f2\u7684\u503c\uff0c\u5426\u5219\u8fd4\u56de\u8868\u8fbe\u5f0f3\u7684\u503c.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001switch\u8bed\u53e5<\/h2>\n\n\n\n<pre class=\"wp-block-preformatted\">int i = 0;<br>switch(i){ \/\/ \u586b\u4e00\u4e2a\u53d8\u91cf<br> &nbsp; &nbsp;case 5:case 4:case 3:<br> &nbsp; &nbsp; &nbsp; &nbsp;printf(\"i &gt;= 3\");<br> &nbsp; &nbsp; &nbsp; &nbsp;break; \/\/ \u8bed\u6cd5<br> &nbsp; &nbsp;case 6:<br> &nbsp; &nbsp; &nbsp; &nbsp;printf();<br> &nbsp; &nbsp; &nbsp; &nbsp;break;<br> &nbsp; &nbsp;case 2:<br> &nbsp; &nbsp; &nbsp; &nbsp;printf(\"i = 2\");<br> &nbsp; &nbsp; &nbsp; &nbsp;break;<br> &nbsp; &nbsp;default: \/\/ \u5176\u4ed6\u60c5\u51b5<br> &nbsp; &nbsp; &nbsp; &nbsp;printf(\"i &lt; 2\");<br> &nbsp; &nbsp; &nbsp; &nbsp;break;<br>}<br>\/\/ break \u8df3\u51fa\u6765<\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><code>break<\/code>\u7684\u4f5c\u7528\u662f\u4f7f\u7a0b\u5e8f\u4eceswitch\u8bed\u53e5\u4e2d\u4e2d\u65ad\u3002<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u903b\u8f91\u8868\u8fbe\u5f0f i &lt; j\u7684\u6bd4\u8f83\u4f1a\u4ea7\u751f\u4e00\u4e2a\u6574\u6570\uff1a0\uff08\u5047\uff09\u62161\uff08\u771f\uff09 \u5173\u7cfb\u8fd0\u7b97\u7b26 \u7b26\u53f7 \u542b\u4e49 &lt; \u5c0f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","hentry","category-23"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/comments?post=230"}],"version-history":[{"count":1,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts\/230\/revisions"}],"predecessor-version":[{"id":231,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/posts\/230\/revisions\/231"}],"wp:attachment":[{"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/media?parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/categories?post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4.189.252.43\/index.php\/wp-json\/wp\/v2\/tags?post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}