{"id":4900,"date":"2024-02-20T01:44:22","date_gmt":"2024-02-20T01:44:22","guid":{"rendered":"https:\/\/isophal.com\/?p=4900"},"modified":"2024-02-20T01:44:24","modified_gmt":"2024-02-20T01:44:24","slug":"star-patterns-program-in-c","status":"publish","type":"post","link":"https:\/\/isophal.com\/news\/2024\/02\/20\/4900.html\/","title":{"rendered":"Star Patterns Program in C"},"content":{"rendered":"\n<p><strong>We are going to cover the following patterns. You can view the code of any pattern given below by clicking on the pattern.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"200\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image.png\" alt=\"\" class=\"wp-image-4901\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image.png 200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-100x100.png 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Square-Star\">Square Star Pattern<\/h2>\n\n\n\n<p>The code to create the square star pattern is given below:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.javatpoint.com\/star-program-in-c#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/star-program-in-c#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/star-program-in-c#\"><\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>#include&nbsp;&lt;stdio.h&gt;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;<strong>int<\/strong>&nbsp;main()&nbsp;&nbsp;<\/li>\n\n\n\n<li>{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>int<\/strong>&nbsp;n;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Enter&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;scanf(&#8220;%d&#8221;,&amp;n);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;i=0;i&lt;n;i++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;j=0;j&lt;n;j++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;*&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;\\n&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong>&nbsp;0;&nbsp;&nbsp;<\/li>\n\n\n\n<li>}&nbsp;&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"200\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-1.png\" alt=\"\" class=\"wp-image-4902\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-1.png 200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-1-100x100.png 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Hollow-Mirrored-Rhombus-Star\">Hollow Mirrored Rhombus Star Pattern<\/h2>\n\n\n\n<p>The code for the hollow mirrored rhombus star pattern is given below:<\/p>\n\n\n\n<p><a href=\"https:\/\/www.javatpoint.com\/star-program-in-c#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/star-program-in-c#\"><\/a><a href=\"https:\/\/www.javatpoint.com\/star-program-in-c#\"><\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>#include&nbsp;&lt;stdio.h&gt;&nbsp;&nbsp;<\/li>\n\n\n\n<li><strong>int<\/strong>&nbsp;main()&nbsp;&nbsp;<\/li>\n\n\n\n<li>{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>int<\/strong>&nbsp;n;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Enter&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;scanf(&#8220;%d&#8221;,&amp;n);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;i=1;i&lt;=n;i++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;j=1;j&lt;i;j++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8221;&nbsp;&#8220;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;k=1;k&lt;=n;k++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>if<\/strong>(i==1&nbsp;||&nbsp;i==n&nbsp;||&nbsp;k==1&nbsp;||&nbsp;k==n)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;*&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>else<\/strong>&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8221;&nbsp;&#8220;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;\\n&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong>&nbsp;0;&nbsp;&nbsp;<\/li>\n\n\n\n<li>}&nbsp;&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"200\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-2.png\" alt=\"\" class=\"wp-image-4903\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-2.png 200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-2-100x100.png 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<p>Right Triangle Star Pattern<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>#include&nbsp;&lt;stdio.h&gt;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;<\/li>\n\n\n\n<li><strong>int<\/strong>&nbsp;main()&nbsp;&nbsp;<\/li>\n\n\n\n<li>{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>int<\/strong>&nbsp;n;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Enter&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;scanf(&#8220;%d&#8221;,&amp;n);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;i=1;i&lt;=n;i++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;j=1;j&lt;=i;j++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;*&nbsp;&#8220;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;\\n&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong>&nbsp;0;&nbsp;&nbsp;<\/li>\n\n\n\n<li>}&nbsp;&nbsp;<\/li>\n<\/ol>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"415\" height=\"298\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-3.png\" alt=\"\" class=\"wp-image-4904\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-3.png 415w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-3-300x215.png 300w\" sizes=\"auto, (max-width: 415px) 100vw, 415px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"200\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-4.png\" alt=\"\" class=\"wp-image-4905\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-4.png 200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-4-100x100.png 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"Mirrored-Right-Triangle-Star\">Mirrored Right Triangle Star Pattern<\/h2>\n\n\n\n<p>The code for the mirrored right triangle star pattern is given below:<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>#include&nbsp;&lt;stdio.h&gt;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;<\/li>\n\n\n\n<li><strong>int<\/strong>&nbsp;main()&nbsp;&nbsp;<\/li>\n\n\n\n<li>{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>int<\/strong>&nbsp;n,m=1;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Enter&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;scanf(&#8220;%d&#8221;,&amp;n);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;i=n;i&gt;=1;i&#8211;)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;j=1;j&lt;=i-1;j++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8221;&nbsp;&#8220;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;k=1;k&lt;=m;k++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;*&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;\\n&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m++;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong>&nbsp;0;&nbsp;&nbsp;<\/li>\n\n\n\n<li>}&nbsp;&nbsp;<\/li>\n<\/ol>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"364\" height=\"253\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-6.png\" alt=\"\" class=\"wp-image-4907\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-6.png 364w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-6-300x209.png 300w\" sizes=\"auto, (max-width: 364px) 100vw, 364px\" \/><\/figure>\n\n\n\n<p>Pyramid Star Pattern<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"200\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-7.png\" alt=\"\" class=\"wp-image-4908\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-7.png 200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-7-100x100.png 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>#include&nbsp;&lt;stdio.h&gt;&nbsp;&nbsp;<\/li>\n\n\n\n<li><strong>int<\/strong>&nbsp;main()&nbsp;&nbsp;<\/li>\n\n\n\n<li>{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>int<\/strong>&nbsp;n,m;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Enter&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;scanf(&#8220;%d&#8221;,&amp;n);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;m=n;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;i=1;i&lt;=n;i++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;j=1;j&lt;=m-1;j++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8221;&nbsp;&#8220;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;k=1;k&lt;=2*i-1;k++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;*&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m&#8211;;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;\\n&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong>&nbsp;0;&nbsp;&nbsp;<\/li>\n\n\n\n<li>}&nbsp;&nbsp;<\/li>\n<\/ol>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"409\" height=\"313\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-8.png\" alt=\"\" class=\"wp-image-4909\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-8.png 409w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-8-300x230.png 300w\" sizes=\"auto, (max-width: 409px) 100vw, 409px\" \/><\/figure>\n\n\n\n<p>Inverted Pyramid Star Pattern<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"200\" height=\"200\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-9.png\" alt=\"\" class=\"wp-image-4910\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-9.png 200w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-9-100x100.png 100w\" sizes=\"auto, (max-width: 200px) 100vw, 200px\" \/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"1\">\n<li>#include&nbsp;&lt;stdio.h&gt;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;<\/li>\n\n\n\n<li><strong>int<\/strong>&nbsp;main()&nbsp;&nbsp;<\/li>\n\n\n\n<li>{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>int<\/strong>&nbsp;n,m=1;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;Enter&nbsp;the&nbsp;number&nbsp;of&nbsp;rows&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;scanf(&#8220;%d&#8221;,&amp;n);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;i=n;i&gt;=1;i&#8211;)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;j=1;j&lt;m;j++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8221;&nbsp;&#8220;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>for<\/strong>(<strong>int<\/strong>&nbsp;k=1;k&lt;=2*i-1;k++)&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;*&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m++;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf(&#8220;\\n&#8221;);&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;<strong>return<\/strong>&nbsp;0;&nbsp;&nbsp;<\/li>\n\n\n\n<li>}&nbsp;&nbsp;<\/li>\n<\/ol>\n\n\n\n<p><strong>Output<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"294\" height=\"167\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-10.png\" alt=\"\" class=\"wp-image-4911\"\/><\/figure>\n\n\n\n<p>Right Triangle Star Pattern<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"657\" src=\"https:\/\/isophal.com\/wp-content\/uploads\/2024\/02\/image-11-1024x657.png\" alt=\"\" class=\"wp-image-4912\" srcset=\"https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11-1024x657.png 1024w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11-600x385.png 600w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11-300x192.png 300w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11-768x493.png 768w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11-1170x750.png 1170w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11-585x375.png 585w, https:\/\/isophal.com\/news\/wp-content\/uploads\/2024\/02\/image-11.png 1464w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\">include<\/h1>\n\n\n\n<p>int main()<br>{<br>int n;<br>printf(&#8220;Enter the number of rows : &#8220;);<br>scanf(&#8220;%d&#8221;,&amp;n);<br>for(int i=65;i&lt;=n;i++)<br>{<br>for(int j=65;j&lt;=i;j++)<br>{<br>printf(&#8220;%c &#8220;,i);<br>}<br>printf(&#8220;\\n&#8221;);<br>}<br>return 0;<br>}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are going to cover the following&hellip;<\/p>\n","protected":false},"author":1,"featured_media":4913,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[51],"class_list":["post-4900","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cc","tag-cc"],"_links":{"self":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts\/4900","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/comments?post=4900"}],"version-history":[{"count":1,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts\/4900\/revisions"}],"predecessor-version":[{"id":4914,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/posts\/4900\/revisions\/4914"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/media\/4913"}],"wp:attachment":[{"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/media?parent=4900"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/categories?post=4900"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/isophal.com\/news\/wp-json\/wp\/v2\/tags?post=4900"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}