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.

Star Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in CStar Program in C

Square Star Pattern

The code to create the square star pattern is given below:

Output

Star Program in C

Hollow Square Star Pattern

Now, we create the hollow square star pattern. The source code for this pattern is given below:

Output

Star Program in C

Hollow Square Pattern with Diagonal

The code for the hollow square star pattern is given below:

Output

Star Program in C

Rhombus Star Pattern

The code for the rhombus star pattern is given below:

Output

Star Program in C

Hollow Rhombus Star Pattern

The code for the hollow rhombus star pattern is given below:

Output

Star Program in C

Mirrored Rhombus Star Pattern

The code for the mirrored rhombus star pattern is given below:

Output

Star Program in C

Hollow Mirrored Rhombus Star Pattern

The code for the hollow mirrored rhombus star pattern is given below:

Output

Star Program in C

Right Triangle Star Pattern

The code for the right triangle star pattern is given below:

Output

Star Program in C

Hollow Right Triangle Star Pattern

The code for the hollow right triangle star pattern is given below:

Output

Star Program in C

Mirrored Right Triangle Star Pattern

The code for the mirrored right triangle star pattern is given below:

Output

Star Program in C

Hollow Mirrored Right Triangle Star Pattern

The code for the hollow mirrored right triangle star pattern is given below:

Output

Star Program in C

Inverted Right Triangle Star Pattern

The code for the inverted right triangle star pattern is given below:

Output

Star Program in C

Hollow Inverted Right Triangle Star Pattern

The code for the hollow inverted right triangle star pattern is given below:

Output

Star Program in C

Inverted Mirrored Right Triangle Star Pattern

The code for the inverted mirrored right triangle star pattern is given below:

Output

Star Program in C

Hollow Inverted Mirrored Right Triangle Star Pattern

The code for the hollow inverted mirrored right triangle star pattern is given below:

Output

Star Program in C

Pyramid Star Pattern

The code for the pyramid star pattern is given below:

Output

Star Program in C

Hollow Pyramid Star Pattern

The code for the hollow pyramid star pattern is given below:

Output

Star Program in C

Inverted Pyramid Star Pattern

The code for the inverted pyramid is given below:

Output

Star Program in C

Hollow Pyramid Star Pattern

The code for the hollow pyramid star pattern is given below:

Output

Star Program in C

Half Diamond Star Pattern

The code for the half diamond star pattern is given below:

Output

Star Program in C

Diamond Star Pattern

The code for the diamond star pattern is given below:

Output

Star Program in C

Right Arrow Star Pattern

The code of the right arrow star pattern is given below:

Output

Star Program in C

Left Arrow Star Pattern

The code for the Left arrow star pattern is given below:

Output

Star Program in C

Plus Star Pattern

The code for the plus star pattern is given below:

Output

Star Program in C

X Star Pattern

The code for the X star pattern is given below:

Output

Star Program in C