Star Patterns Program in C
In this topic, we will learn how to create the patterns by using C language. We will create the patterns by using either a ‘*’ star character or some other character. We will create different patterns or a geometrical shape such as triangle, square, etc.
We are going to cover the following patterns. You can view the code of any pattern given below by clicking on the pattern.
Square Star Pattern
The code to create the square star pattern is given below:
Output
Hollow Square Star Pattern
Now, we create the hollow square star pattern. The source code for this pattern is given below:
Output
Hollow Square Pattern with Diagonal
The code for the hollow square star pattern is given below:
Output
Rhombus Star Pattern
The code for the rhombus star pattern is given below:
Output
Hollow Rhombus Star Pattern
The code for the hollow rhombus star pattern is given below:
Output
Mirrored Rhombus Star Pattern
The code for the mirrored rhombus star pattern is given below:
Output
Hollow Mirrored Rhombus Star Pattern
The code for the hollow mirrored rhombus star pattern is given below:
Output
Right Triangle Star Pattern
The code for the right triangle star pattern is given below:
Output
Hollow Right Triangle Star Pattern
The code for the hollow right triangle star pattern is given below:
Output
Mirrored Right Triangle Star Pattern
The code for the mirrored right triangle star pattern is given below:
Output
Hollow Mirrored Right Triangle Star Pattern
The code for the hollow mirrored right triangle star pattern is given below:
Output
Inverted Right Triangle Star Pattern
The code for the inverted right triangle star pattern is given below:
Output
Hollow Inverted Right Triangle Star Pattern
The code for the hollow inverted right triangle star pattern is given below:
Output
Inverted Mirrored Right Triangle Star Pattern
The code for the inverted mirrored right triangle star pattern is given below:
Output
Hollow Inverted Mirrored Right Triangle Star Pattern
The code for the hollow inverted mirrored right triangle star pattern is given below:
Output
Pyramid Star Pattern
The code for the pyramid star pattern is given below:
Output
Hollow Pyramid Star Pattern
The code for the hollow pyramid star pattern is given below:
Output
Inverted Pyramid Star Pattern
The code for the inverted pyramid is given below:
Output
Hollow Pyramid Star Pattern
The code for the hollow pyramid star pattern is given below:
Output
Half Diamond Star Pattern
The code for the half diamond star pattern is given below:
Output
Diamond Star Pattern
The code for the diamond star pattern is given below:
Output
Right Arrow Star Pattern
The code of the right arrow star pattern is given below:
Output
Left Arrow Star Pattern
The code for the Left arrow star pattern is given below:
Output
Plus Star Pattern
The code for the plus star pattern is given below:
Output
X Star Pattern
The code for the X star pattern is given below:
Output