Top 100 Pattern Printing Programs

Pattern Printing Program

Pattern Printing Question are very important for the technical interviews as mostly companies asked these questions in their placements as well as in interview rounds. There are two types of Pattern printing programs –

  • Star based Pattern Printing Programs
  • Number based Pattern Printing Programs
pattern-printing program

Different Pattern Printing Programs Questions

Here, we will discuss different important pattern printing question asked in different technical interview by companies.We will print some famous pattern like star patterns, number patterns, trapezium pattern and many more in these languages :

Pattern Printing Programs in C

Star Pattern Printing Programs Questions in C

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

Square Star Pattern

Difficulty – ★

Checkout code for this program

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

Hollow Square Star Pattern

Difficulty – ★ and 1/2

Checkout code for this program –

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

Rhombus Star Pattern

Difficulty – ★★

Checkout code for this program –

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

Rectangle Star Pattern

Difficulty – ★

Checkout code for this program –

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

Hollow Rectangle Star Pattern

Difficulty – ★ and 1/2

Checkout code for this program –

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

Parallelogram Star Pattern

Difficulty – ★★

Checkout code for this program –

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

Mirrored Rhombus Star Pattern

Difficulty – ★★ and 1/2

Checkout code for this program –

           *
           **
           ***
           ****

Triangle Star Pattern

Difficulty – ★ and 1/2

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

Pyramid Star Pattern

Difficulty – ★★

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

Hollow Pyramid Star Pattern

Difficulty – ★★

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

Inverted Pyramid Star Pattern

Difficulty – ★★

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

Inverted Hollow Pyramid Star Pattern

Difficulty – ★★ and 1/2

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

Half Diamond Star Pattern

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

Half Diamond Star Pattern Inverted

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

Diamond Star Pattern

Number Pattern Printing Programs Questions in C

           1111
           1111
           1111
           1111

Basic Square 1 Pattern

Checkout code for this program –

           1111
           2222
           3333
           4444

Basic Square incrementing Pattern

Checkout code for this program –

           333
           313
           323
           333

Internal varsity square Pattern

Checkout code for this program –

           1
           23
           456
           78910

Basic Right Triangle Number Pattern

Checkout code for this program –

           10987
           456
           32
           1

Basic Right Triangle Number Pattern (Inverted)

Checkout code for this program –

           6666
           555
           44
           3

Basic incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           3
           44
           555
           6666

Basic incrementing Triangle Pattern(Inverted) initialised = 3

Checkout code for this program –

           3
           4 5
           6 7 8
           9 10 11 12

Basic double incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           2
           43
           765
           1110198
           1110198
           765
           43
           2

Basic incrementing Triangle Pattern(Inverted) initialised Mirrored Sandwich = 3

Checkout code for this program –

           3
           44
           555
           6666
           555
           44
           3

Basic incrementing Diamond Pattern(Inverted) initialised = 3

Checkout code for this program –

            3
            45
            678
            9101112
            678
            45
            3

Basic double incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           3
           54
           876
           1211109
           876
           54
           3

Basic incrementing Triangle Pattern(Inverted) initialised Mirrored = 3

Checkout code for this program –

           2
           33
           444
           5555
           5555
           444
           33
           2

Basic incrementing Diamond Pattern(Inverted Sandwich) initialised = 3

Checkout code for this program –

            2
            34
            567
            891011
            891011
            567
            34
            2

Basic double incrementing Triangle Pattern initialised Sandwich= 3

Checkout code for this program –

Number Star Mix Pattern Programs in C

           1*2*3*4
           5*6*7*8
           9*10*11*12
           13*14*15*16

Basic incrementing Squared Number-Star Pattern 

Checkout code for this program

C

           13*14*15*16
           9*10*11*12
           5*6*7*8
           1*2*3*4

Basic incrementing inverted Squared Number-Star Pattern

Checkout code for this program

C

          1*2*3*4
          9*10*11*12
          5*6*7*8
          13*14*15*16

Basic incrementing Squared Number-Star Pattern + Basic incrementing inverted Squared Number-Star Pattern (alternate)

Checkout code for this program

C

          1*2*3*4
          9*10*11*12
          13*14*15*16
          5*6*7*8

Basic incrementing Squared Number-Star Pattern + Basic incrementing inverted Squared Number-Star Pattern (alternate)

Type 2

Checkout code for this program

C

          1*2*3*4
          9*10*11*12
          17*18*19*20
          13*14*15*16
          5*6*7*8

Basic incrementing Squared Number-Star Pattern + Basic incrementing inverted Squared Number-Star Pattern (alternate)

Type 3

Checkout code for this program

C

          4*3*2*1
          12*11*10*9
          8*7*6*5
          16*15*14*13

Basic incrementing Squared Number-Star Pattern Mirrored + Basic incrementing inverted Squared Number-Star Pattern Mirrored (alternate)

Checkout code for this program

C

           1
           2*3
           4*5*6
           7*8*9*10

Basic incrementing Triangle Pattern

Checkout code for this program

C

           7*8*9*10
           4*5*6
           2*3
           1

Basic incrementing Triangle Pattern

Checkout code for this program

C

           1
           4*5*6
           2*3
           7*8*9*10

Basic incrementing Triangle Pattern + Inverted (Mix)

Checkout code for this program

C

           1
           3*2
           6*5*4
           10*9*8*7

Basic incrementing mirrored Triangle Pattern

Checkout code for this program

C

           10*9*8*7
           6*5*4
           3*2
           1

Basic incrementing inverted mirrored Triangle Pattern

Checkout code for this program

C

           1
           4*5*6
           2*3
           7*8*9*10

Basic incrementing Triangle Pattern + Inverted (Mix)

Checkout code for this program

C

           1
           2*2
           3*3*3
           4*4*4*4
           3*3*3
           2*2
           1

Basic Diamond Number Star Pattern

Checkout code for this program

C

           1
           2*2
           3*3*3
           4*4*4*4
           4*4*4*4
           3*3*3
           2*2
           1

Basic Diamond Number Star Pattern (Sandwich)

Checkout code for this program

C

           4*4*4*4
           3*3*3
           2*2
           1
           1
           2*2
           3*3*3
           4*4*4*4

Basic Diamond Number Star Pattern (Sandwich Inverted)

Checkout code for this program

C

           2
           3*3
           4*4*4
           3*3
           2

Basic Diamond Number Star Pattern initialised

Checkout code for this program

C

           2
           3*3
           4*4*4
           4*4*4
           3*3
           2

Basic Diamond Number Star Pattern (Sandwich)

Checkout code for this program

C

           6*6*6*6
           5*5*5
           4*4
           3
           3
           4*4
           5*5*5
           6*6*6*6

Basic Diamond Number Star Pattern (Sandwich Inverted)

Checkout code for this program

C

Pattern Printing Programs in Java

Star Pattern Printing Programs in Java

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

Square Star Pattern

Difficulty – ★

Checkout code for this program –

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

Hollow Square Star Pattern

Difficulty – ★ and 1/2

Checkout code for this program –

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

Rhombus Star Pattern

Difficulty – ★★

Checkout code for this program –

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

Rectangle Star Pattern

Difficulty – ★

Checkout code for this program –

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

Hollow Rectangle Star Pattern

Difficulty – ★ and 1/2

Checkout code for this program –

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

Parallelogram Star Pattern

Difficulty – ★★

Checkout code for this program –

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

Mirrored Rhombus Star Pattern

Difficulty – ★★ and 1/2

Checkout code for this program –

           *
           **
           ***
           ****

Triangle Star Pattern

Difficulty – ★ and 1/2

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

Pyramid Star Pattern

Difficulty – ★★

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

Hollow Pyramid Star Pattern

Difficulty – ★★

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

Inverted Pyramid Star Pattern

Difficulty – ★★

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

Inverted Hollow Pyramid Star Pattern

Difficulty – ★★ and 1/2

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

Half Diamond Star Pattern

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

Diamond Star Pattern

Number Pattern Printing Programs Questions in Java

           1111
           1111
           1111
           1111

Basic Square 1 Pattern

Checkout code for this program –

           1111
           2222
           3333
           4444

Basic Square incrementing Pattern

Checkout code for this program –

           333
           313
           323
           333

Internal varsity square Pattern

Checkout code for this program –

           1
           23
           456
           78910

Basic Right Triangle Number Pattern

Checkout code for this program –

           10987
           456
           32
           1

Basic Right Triangle Number Pattern (Inverted)

Checkout code for this program –

           6666
           555
           44
           3

Basic incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           3
           44
           555
           6666

Basic incrementing Triangle Pattern(Inverted) initialised = 3

Checkout code for this program –

           3
           4 5
           6 7 8
           9 10 11 12

Basic double incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           2
           43
           765
           1110198
           1110198
           765
           43
           2

Basic incrementing Triangle Pattern(Inverted) initialised Mirrored Sandwich = 3

Checkout code for this program –

           3
           44
           555
           6666
           555
           44
           3

Basic incrementing Diamond Pattern(Inverted) initialised = 3

Checkout code for this program –

            3
            45
            678
            9101112
            678
            45
            3

Basic double incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           3
           54
           876
           1211109
           876
           54
           3

Basic incrementing Triangle Pattern(Inverted) initialised Mirrored = 3

Checkout code for this program –

           2
           33
           444
           5555
           5555
           444
           33
           2

Basic incrementing Diamond Pattern(Inverted Sandwich) initialised = 3

Checkout code for this program –

            2
            34
            567
            891011
            891011
            567
            34
            2

Basic double incrementing Triangle Pattern initialised Sandwich= 3

Checkout code for this program –

Number Star Mix Pattern Programs in Java

           1*2*3*4
           5*6*7*8
           9*10*11*12
           13*14*15*16

Basic incrementing Squared Number-Star Pattern 

Checkout code for this program

           13*14*15*16
           9*10*11*12
           5*6*7*8
           1*2*3*4

Basic incrementing inverted Squared Number-Star Pattern

Checkout code for this program

          1*2*3*4
          9*10*11*12
          5*6*7*8
          13*14*15*16

Basic incrementing Squared Number-Star Pattern + Basic incrementing inverted Squared Number-Star Pattern (alternate)

Checkout code for this program

          1*2*3*4
          9*10*11*12
          13*14*15*16
          5*6*7*8

Basic incrementing Squared Number-Star Pattern + Basic incrementing inverted Squared Number-Star Pattern (alternate)

Type 2

Checkout code for this program

          1*2*3*4
          9*10*11*12
          17*18*19*20
          13*14*15*16
          5*6*7*8

Basic incrementing Squared Number-Star Pattern + Basic incrementing inverted Squared Number-Star Pattern (alternate)

Type 3

Checkout code for this program

          4*3*2*1
          12*11*10*9
          8*7*6*5
          16*15*14*13

Basic incrementing Squared Number-Star Pattern Mirrored + Basic incrementing inverted Squared Number-Star Pattern Mirrored (alternate)

Checkout code for this program

           1
           2*3
           4*5*6
           7*8*9*10

Basic incrementing Triangle Pattern

Checkout code for this program

           7*8*9*10
           4*5*6
           2*3
           1

Basic incrementing Triangle Pattern

Checkout code for this program

           1
           4*5*6
           2*3
           7*8*9*10

Basic incrementing Triangle Pattern + Inverted (Mix)

Checkout code for this program

           1
           3*2
           6*5*4
           10*9*8*7

Basic incrementing mirrored Triangle Pattern

Checkout code for this program

           10*9*8*7
           6*5*4
           3*2
           1

Basic incrementing inverted mirrored Triangle Pattern

Checkout code for this program

           1
           4*5*6
           2*3
           7*8*9*10

Basic incrementing Triangle Pattern + Inverted (Mix)

Checkout code for this program

           1
           2*2
           3*3*3
           4*4*4*4
           3*3*3
           2*2
           1

Basic Diamond Number Star Pattern

Checkout code for this program

           1
           2*2
           3*3*3
           4*4*4*4
           4*4*4*4
           3*3*3
           2*2
           1

Basic Diamond Number Star Pattern (Sandwich)

Checkout code for this program

           4*4*4*4
           3*3*3
           2*2
           1
           1
           2*2
           3*3*3
           4*4*4*4

Basic Diamond Number Star Pattern (Sandwich Inverted)

Checkout code for this program

           2
           3*3
           4*4*4
           3*3
           2

Basic Diamond Number Star Pattern initialised

Checkout code for this program

           2
           3*3
           4*4*4
           4*4*4
           3*3
           2

Basic Diamond Number Star Pattern (Sandwich)

Checkout code for this program

           6*6*6*6
           5*5*5
           4*4
           3
           3
           4*4
           5*5*5
           6*6*6*6

Basic Diamond Number Star Pattern (Sandwich Inverted)

Checkout code for this program

Pattern Printing Programs in Python

Star Pattern Printing Programs Questions in Python

           ****
           ****
           ****
           ****
Square Star Pattern Difficulty – ★ Checkout code for this program –
           ****
           *  *
           *  *
           ****

Hollow Square Star Pattern

Difficulty – ★ and 1/2

Checkout code for this program –

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

Rhombus Star Pattern

Difficulty – ★★

Checkout code for this program –

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

Rectangle Star Pattern

Difficulty – ★

Checkout code for this program –

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

Hollow Rectangle Star Pattern

Difficulty – ★ and 1/2

Checkout code for this program –

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

Parallelogram Star Pattern

Difficulty – ★★

Checkout code for this program –

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

Mirrored Rhombus Star Pattern

Difficulty – ★★ and 1/2

Checkout code for this program –

           *
           **
           ***
           ****

Triangle Star Pattern

Difficulty – ★ and 1/2

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

Pyramid Star Pattern

Difficulty – ★★

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

Hollow Pyramid Star Pattern

Difficulty – ★★

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

Inverted Pyramid Star Pattern

Difficulty – ★★

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

Inverted Hollow Pyramid Star Pattern

Difficulty – ★★ and 1/2

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

Half Diamond Star Pattern

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

Half Diamond Star Pattern Inverted

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

Diamond Star Pattern

Number Pattern Printing Programs Questions in Python

           1111
           1111
           1111
           1111

Basic Square 1 Pattern

Checkout code for this program –

           1111
           2222
           3333
           4444

Basic Square incrementing Pattern

Checkout code for this program –

           333
           313
           323
           333

Internal varsity square Pattern

Checkout code for this program –

           1
           23
           456
           78910

Basic Right Triangle Number Pattern

Checkout code for this program –

           10987
           456
           32
           1

Basic Right Triangle Number Pattern (Inverted)

Checkout code for this program –

           6666
           555
           44
           3

Basic incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           3
           44
           555
           6666

Basic incrementing Triangle Pattern(Inverted) initialised = 3

Checkout code for this program –

           3
           4 5
           6 7 8
           9 10 11 12

Basic double incrementing Triangle Pattern initialised = 3

Checkout code for this program –

           3
           44
           555
           6666
           555
           44
           3

Basic incrementing Diamond Pattern(Inverted) initialised = 3

Checkout code for this program –

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription

4 comments on “Top 100 Pattern Printing Programs”