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

PPTX
Dynamic memory allocation
PPTX
Control statements in java
PPTX
String In C Language
PPTX
Super keyword in java
PPT
Applet life cycle
PPTX
Looping statements in C
PDF
Unit II chapter 4 Loops in C
PPTX
Unit 9. Structure and Unions
Dynamic memory allocation
Control statements in java
String In C Language
Super keyword in java
Applet life cycle
Looping statements in C
Unit II chapter 4 Loops in C
Unit 9. Structure and Unions

What's hot (20)

PDF
Strings in Python
PPT
Strings Functions in C Programming
PPS
Wrapper class
PPSX
C lecture 4 nested loops and jumping statements slideshare
PPTX
Arrays in c
PPTX
My lectures circular queue
PPTX
Pointer in c program
DOC
Jumping statements
PPT
PPTX
C programming - String
PPTX
Function overloading
PDF
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
PPT
Python List.ppt
PDF
Introduction to Input/Output Functions in C
PPTX
Operators in java
PPTX
Structures in c language
PPT
Function overloading(c++)
PPTX
this keyword in Java.pptx
PPTX
Function in C program
PPTX
Strings in Python
Strings Functions in C Programming
Wrapper class
C lecture 4 nested loops and jumping statements slideshare
Arrays in c
My lectures circular queue
Pointer in c program
Jumping statements
C programming - String
Function overloading
STRUCTURE AND UNION IN C MRS.SOWMYA JYOTHI.pdf
Python List.ppt
Introduction to Input/Output Functions in C
Operators in java
Structures in c language
Function overloading(c++)
this keyword in Java.pptx
Function in C program
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)

PPTX
C program language tutorial for loop while loop do while loop
PDF
Arduino programming of ML-style in ATS
PPTX
Kotlin
PDF
Python for High School Programmers
PPTX
Simple c program
PDF
C SLIDES PREPARED BY M V B REDDY
PDF
pattern-printing-in-c.pdf
PPTX
Being Expressive in Code
PDF
Pattern printing-in-c(Jaydip Kikani)
PDF
Python Peculiarities
PDF
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
PDF
A CTF Hackers Toolbox
PDF
PDF
CP Handout#5
PDF
C programing Tutorial
PPTX
PDF
Python for Scientific Computing -- Ricardo Cruz
DOCX
Pslb lab manual
PDF
Introduction to programming - class 11
C program language tutorial for loop while loop do while loop
Arduino programming of ML-style in ATS
Kotlin
Python for High School Programmers
Simple c program
C SLIDES PREPARED BY M V B REDDY
pattern-printing-in-c.pdf
Being Expressive in Code
Pattern printing-in-c(Jaydip Kikani)
Python Peculiarities
[Question Paper] Introduction To C++ Programming (Revised Course) [April / 2014]
A CTF Hackers Toolbox
CP Handout#5
C programing Tutorial
Python for Scientific Computing -- Ricardo Cruz
Pslb lab manual
Introduction to programming - class 11

Recently uploaded (20)

PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Complications of Minimal Access Surgery at WLH
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PPTX
Lesson notes of climatology university.
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
Cell Structure & Organelles in detailed.
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Presentation on HIE in infants and its manifestations
human mycosis Human fungal infections are called human mycosis..pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Complications of Minimal Access Surgery at WLH
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
Lesson notes of climatology university.
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Cell Structure & Organelles in detailed.
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
GDM (1) (1).pptx small presentation for students
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
2.FourierTransform-ShortQuestionswithAnswers.pdf
Presentation on HIE in infants and its manifestations

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.