SlideShare a Scribd company logo
9
Most read
10
Most read
13
Most read
C language Pattern Print
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
Sourav Ganguly
Please visit my Youtube channel
Step 1: go to www.google.com
Step 2: Search for “sourav ganguly c programming”.
Step 3: Click on my image bottom of the video. You will reach my
channel.
Youtube (direct link):
https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg
Website:
http://www.startselfstudy.blogspot.in
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
What is pattern of C language…..
Different types of pattern in C language…..
Secret of pattern printing in C language…..
Discover the secret of pattern printing …..
How print pattern with loops in C language…..
Pattern printing example with real program…..
[Live Demo on YouTube channel]
Index
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
***
*****
*******
*******
*****
***
*
When we display something with some special order then it is
called pattern.
What is pattern of C language…..
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
**
***
****
@
@@
@@@
@@@@
$$$$
$$$
$$
$
####
###
##
#
****
****
****
****
!
!!!
!!!!!
!!!!!!!
&&&&&&&
&&&&&
&&&
&
*****
*
*
*****
Different types of pattern in C language…..
Secret of pattern printing in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
Computer
Screen
Column
1
Column
2
Column
3
Column
4
Row
1
Row
2
Row
3
Row
4
Raster Scan Display
Row 1
Column 1
Secret of pattern printing in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
Computer
Screen
Column
1
Column
2
Column
3
Column
4
Row
1
Row
2
Row
3
Row
4
Space -> printf(“ ”);
Symbol -> printf(“*”);
Next line -> printf(“n”);
Discover the secret of pattern printing …..
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
Computer
Screen
Column
1
Column
2
Column
3
Column
4
Row
1
Row
2
Row
3
Row
4
Row
No.
Space
No.
Star
No.
Total
Row
1 3 1 4
2 2 2 4
3 1 3 4
4 0 4 4
Write this table.
Calculate the relation.
Relation:
Space No = (Total Row – Row No)
Star No = Row No
How print pattern with loops in C language…..contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=1 ; star<=row ; star=star+1)
{
printf("*");
}
printf("n");
}
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* *
* * *
* * * *
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=1 ; star<=row ; star=star+1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 0 1 4
2 0 2 4
3 0 3 4
4 0 4 4
Relation:
Space No = 0
Star No = Row No
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
* * * *
* * *
* *
*
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=4 ; star>=row ; star=star-1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 0 4 4
2 0 3 4
3 0 2 4
4 0 1 4
Relation:
Space No = 0
Star No = Row No (reverse order)
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
* * * *
* * *
* *
*
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(row-1) ; space=space+1)
{
printf(" ");
}
for(star=4 ; star>=row ; star=star-1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 0 4 4
2 1 3 4
3 2 2 4
4 3 1 4
Relation:
Space No = (Row No – 1)
Star No = Row No (reverse order)
How print pattern with loops in C language….. contd…
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
*
* * *
* * * * *
* * * * * * *
for(row=1 ; row<=4 ; row=row+1)
{
for(space=1 ; space<=(4-row) ; space=space+1)
{
printf(" ");
}
for(star=1 ; star>=((row*2)-1) ; star=star+1)
{
printf("*");
}
printf("n");
}
Row
No.
Space
No.
Star
No.
Total
Row
1 3 1 4
2 2 3 4
3 1 5 4
4 0 7 4
Relation:
Space No = (Total Row - Row No)
Star No = ((Row No * 2) -1)
Sourav Ganguly
Please visit my Youtube channel
Step 1: go to www.google.com
Step 2: Search for “sourav ganguly c programming”.
Step 3: Click on my image bottom of the video. You will reach my
channel.
Youtube (direct link):
https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg
Website:
http://www.startselfstudy.blogspot.in
Copyright © 2015 · Sourav Ganguly · All Rights Reserved.

More Related Content

PPT
Looping in C
PPTX
Programming in c Arrays
PPTX
Input and Output In C Language
PPTX
Arrays in Java
PPTX
Loops in C
PPT
RECURSION IN C
PPTX
Constructor and destructor
PPTX
Union in c language
Looping in C
Programming in c Arrays
Input and Output In C Language
Arrays in Java
Loops in C
RECURSION IN C
Constructor and destructor
Union in c language

What's hot (20)

PPTX
C++ string
PPTX
Pointers in C Programming
PDF
Pattern printing-in-c(Jaydip Kikani)
PPTX
Inheritance in java
PPT
History of c
PPTX
PPT
Strings
PPTX
Structure in C language
PPTX
Strings in Java
PDF
Friend function in c++
PPTX
Call by value and call by reference in java
PPTX
String C Programming
PPTX
Functions in c
PDF
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
PPTX
Pointer in C++
DOC
Arrays and Strings
PPTX
What is keyword in c programming
PDF
Character Array and String
PPTX
Strings in C
PPTX
C++ string
Pointers in C Programming
Pattern printing-in-c(Jaydip Kikani)
Inheritance in java
History of c
Strings
Structure in C language
Strings in Java
Friend function in c++
Call by value and call by reference in java
String C Programming
Functions in c
MANAGING INPUT AND OUTPUT OPERATIONS IN C MRS.SOWMYA JYOTHI.pdf
Pointer in C++
Arrays and Strings
What is keyword in c programming
Character Array and String
Strings in C
Ad

Viewers also liked (15)

DOCX
PPT
How to write c program with code blocks
DOCX
OpenWare ThinkGIS
PPT
C programming language character set keywords constants variables data types
PDF
Reede for integrated POP display
PPTX
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
PPTX
Classroom management approaches and Theories and models of classroom management
PPTX
Facultad de ingenieria de sistemas uniremignton engenier 2010
PDF
رضا مصطفوی طباطبایی
DOCX
RAKESH_KUMAR_ANGURAL_14Sep2015(long)
PDF
William Professional Resume
PDF
Top7ReasonsPreventativeMaintenanceCity
PDF
Estadisticas veredal 6
DOCX
y-HR-Loama - LinkedIn
How to write c program with code blocks
OpenWare ThinkGIS
C programming language character set keywords constants variables data types
Reede for integrated POP display
ศิลป์ ทวารวดี ศรีวิชัย ลพบุรี
Classroom management approaches and Theories and models of classroom management
Facultad de ingenieria de sistemas uniremignton engenier 2010
رضا مصطفوی طباطبایی
RAKESH_KUMAR_ANGURAL_14Sep2015(long)
William Professional Resume
Top7ReasonsPreventativeMaintenanceCity
Estadisticas veredal 6
y-HR-Loama - LinkedIn
Ad

Similar to C program language tutorial pattern printing (20)

PDF
pattern-printing-in-c.pdf
PDF
Nesting of for loops using C++
PPTX
Learn How to create pyramids in c
PDF
Automata fix.pdf
PPTX
Simple c program
PDF
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
PPTX
Loop Statements TanCollege Programming course.pptx
PDF
SPL 11 | Nested Loops in C
PDF
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
PPT
All important c programby makhan kumbhkar
PDF
For Loop C++ with various simple examples
PPTX
Lecture 1 mte 407
PPTX
Lecture 1 mte 407
PDF
04-Looping( For , while and do while looping) .pdf
PDF
Shape logic 1
PDF
Progr3
PDF
C Programming Interview Questions
PDF
C++ programming pattern demo1
pattern-printing-in-c.pdf
Nesting of for loops using C++
Learn How to create pyramids in c
Automata fix.pdf
Simple c program
Computer programming subject notes. Quick easy notes for C Programming.Cheat ...
Loop Statements TanCollege Programming course.pptx
SPL 11 | Nested Loops in C
20ES1152 Programming for Problem Solving Lab Manual VRSEC.pdf
All important c programby makhan kumbhkar
For Loop C++ with various simple examples
Lecture 1 mte 407
Lecture 1 mte 407
04-Looping( For , while and do while looping) .pdf
Shape logic 1
Progr3
C Programming Interview Questions
C++ programming pattern demo1

Recently uploaded (20)

PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Lesson notes of climatology university.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
01-Introduction-to-Information-Management.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Pharma ospi slides which help in ospi learning
PDF
Insiders guide to clinical Medicine.pdf
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
PPTX
Cell Structure & Organelles in detailed.
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Cell Types and Its function , kingdom of life
PPTX
master seminar digital applications in india
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Lesson notes of climatology university.
STATICS OF THE RIGID BODIES Hibbelers.pdf
Anesthesia in Laparoscopic Surgery in India
01-Introduction-to-Information-Management.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Final Presentation General Medicine 03-08-2024.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Basic Mud Logging Guide for educational purpose
Pharma ospi slides which help in ospi learning
Insiders guide to clinical Medicine.pdf
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study
Cell Structure & Organelles in detailed.
TR - Agricultural Crops Production NC III.pdf
VCE English Exam - Section C Student Revision Booklet
Cell Types and Its function , kingdom of life
master seminar digital applications in india

C program language tutorial pattern printing

  • 1. C language Pattern Print Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
  • 2. Sourav Ganguly Please visit my Youtube channel Step 1: go to www.google.com Step 2: Search for “sourav ganguly c programming”. Step 3: Click on my image bottom of the video. You will reach my channel. Youtube (direct link): https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg Website: http://www.startselfstudy.blogspot.in Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
  • 3. What is pattern of C language….. Different types of pattern in C language….. Secret of pattern printing in C language….. Discover the secret of pattern printing ….. How print pattern with loops in C language….. Pattern printing example with real program….. [Live Demo on YouTube channel] Index Copyright © 2015 · Sourav Ganguly · All Rights Reserved.
  • 4. Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * *** ***** ******* ******* ***** *** * When we display something with some special order then it is called pattern. What is pattern of C language…..
  • 5. Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * ** *** **** @ @@ @@@ @@@@ $$$$ $$$ $$ $ #### ### ## # **** **** **** **** ! !!! !!!!! !!!!!!! &&&&&&& &&&&& &&& & ***** * * ***** Different types of pattern in C language…..
  • 6. Secret of pattern printing in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. Computer Screen Column 1 Column 2 Column 3 Column 4 Row 1 Row 2 Row 3 Row 4 Raster Scan Display Row 1 Column 1
  • 7. Secret of pattern printing in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * Computer Screen Column 1 Column 2 Column 3 Column 4 Row 1 Row 2 Row 3 Row 4 Space -> printf(“ ”); Symbol -> printf(“*”); Next line -> printf(“n”);
  • 8. Discover the secret of pattern printing ….. Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * Computer Screen Column 1 Column 2 Column 3 Column 4 Row 1 Row 2 Row 3 Row 4 Row No. Space No. Star No. Total Row 1 3 1 4 2 2 2 4 3 1 3 4 4 0 4 4 Write this table. Calculate the relation. Relation: Space No = (Total Row – Row No) Star No = Row No
  • 9. How print pattern with loops in C language…..contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=1 ; star<=row ; star=star+1) { printf("*"); } printf("n"); }
  • 10. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=1 ; star<=row ; star=star+1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 0 1 4 2 0 2 4 3 0 3 4 4 0 4 4 Relation: Space No = 0 Star No = Row No
  • 11. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=4 ; star>=row ; star=star-1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 0 4 4 2 0 3 4 3 0 2 4 4 0 1 4 Relation: Space No = 0 Star No = Row No (reverse order)
  • 12. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(row-1) ; space=space+1) { printf(" "); } for(star=4 ; star>=row ; star=star-1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 0 4 4 2 1 3 4 3 2 2 4 4 3 1 4 Relation: Space No = (Row No – 1) Star No = Row No (reverse order)
  • 13. How print pattern with loops in C language….. contd… Copyright © 2015 · Sourav Ganguly · All Rights Reserved. * * * * * * * * * * * * * * * * for(row=1 ; row<=4 ; row=row+1) { for(space=1 ; space<=(4-row) ; space=space+1) { printf(" "); } for(star=1 ; star>=((row*2)-1) ; star=star+1) { printf("*"); } printf("n"); } Row No. Space No. Star No. Total Row 1 3 1 4 2 2 3 4 3 1 5 4 4 0 7 4 Relation: Space No = (Total Row - Row No) Star No = ((Row No * 2) -1)
  • 14. Sourav Ganguly Please visit my Youtube channel Step 1: go to www.google.com Step 2: Search for “sourav ganguly c programming”. Step 3: Click on my image bottom of the video. You will reach my channel. Youtube (direct link): https://www.youtube.com/channel/UCDsQskBhM107VIYLjg8kczg Website: http://www.startselfstudy.blogspot.in Copyright © 2015 · Sourav Ganguly · All Rights Reserved.