Sunday, May 27, 2018

Star Patterns

Star patterns in C programming

Star patterns are a series of * or any other character used to create some pattern or any geometrical shape such as - square, triangle(Pyramid), rhombus, heart etc. These patterns are often prescribed by many programming books and are best for practicing flow control statement.

Many programmers around world extremely recommended pattern problems, to enhance logical thinking capabilities. As a novice programmer you must practice these patterns to get a good hands on logical thinking and program flow control.

In this exercise I have compiled a list of Star patterns to practice for beginners and intermediate programmers. I have tried my best to explain the logic of each pattern individually.

If you got stuck with some pattern or have some query or suggestion, always feel free to write it down below in the comments section. I always love to hear from you all.

Required knowledge

Basic C programming, Operators, If else, For loop, Nested loop

List of star pattern programming exercises



*****
*****
*****
*****
*****

Square Star Pattern(Click Me)

*****
* *
* *
* *
*****

Hollow Square Star Pattern(Click Me)

*****
** **
* * *
** **
*****

Hollow Square Star Pattern

with Diagonal(Click Me)

*****
*****
*****
*****
*****

Rhombus Star Pattern(Click Me)

*****
* *
* *
* *
*****

Hollow Rhombus Star
Pattern(Click Me)

*****
*****
*****
*****
*****

Mirrored Rhombus Star
Pattern(Click Me)

*****
* *
* *
* *
*****
Hollow Mirrored Rhombus
Star Pattern(Click Me)


*
**
***
****
*****

Right Triangle Star
Pattern(Click Me)

*
**
* *
* *
*****

Hollow Right Triangle
Star Pattern(Click Me)

*
**
***
****
*****

Mirrored Right Triangle
Star Pattern(Click Me)

*
**
* *
* *
*****

Hollow Mirrored Right
Triangle Star Pattern(Click Me)

*****
****
***
**
*

Inverted Right
Triangle Star Pattern(Click Me)

*****
* *
* *
**
*
Hollow Inverted Right
Triangle Star Pattern(Click Me)

*****
****
***
**
*

Inverted Mirrored Right
Triangle Star Pattern(Click Me)

*****
* *
* *
**
*

Hollow Inverted Mirrored
Right Triangle Star Pattern(Click Me)

*
***
*****
*******
*********

Pyramid Star Pattern(Click Me)

*
* *
* *
* *
*********

Hollow Pyramid Star Pattern(Click Me)

*********
*******
*****
***
*

Inverted Pyramid Star Pattern(Click Me)

*********
* *
* *
* *
*
Hollow Inverted Pyramid
Star Pattern(Click Me)

*
**
***
****
*****
****
***
**
*

Half Diamond Star Pattern(Click Me)

*
**
***
****
*****
****
***
**
*

Mirrored Half Diamond
Star Pattern(Click Me)

*
***
*****
*******
*********
*******
*****
***
*

Diamond Star Pattern(Click Me)

**********
**** ****
*** ***
** **
* *
* *
** **
*** ***
**** ****
**********

Hollow Diamond Star Pattern(Click Me)

*****
****
***
**
*
**
***
****
*****

Right Arrow Star Pattern(Click Me)

*****
****
***
**
*
**
***
****
*****
Left Arrow Star Pattern(Click Me)

+
+
+
+
+++++++++
+
+
+
+
Plus Star Pattern(Click Me)

* *
* *
* *
* *
*
* *
* *
* *
* *
X Star Pattern(Click Me)

***
* *
* *
* *
***
* *
* *
* *
***
Eight Star Pattern(Click Me)

***** *****
******* *******
********* *********
*******************
*****************
***************
*************
***********
*********
*******
*****
***
*
Heart Star Pattern(Click Me)

***** *****
******* *******
********* *********
*****C.Pavithra****
*****************
***************
*************
***********
*********
*******
*****
***
*
Heart Star Pattern with Name(Click Me)



Instagram



No comments:

Post a Comment