List of Excercise Programs in C language

© All Rights Reserved

27 views

List of Excercise Programs in C language

© All Rights Reserved

- Simplification and Factorisation
- ghsfghd
- Laws of Indices school test paper
- 16696
- MELJUN CORTES Computer Science Literature
- sakura.doc
- Chapter 2
- Hand Reader Technical Manual 2.7
- 35 23 Base Logic Functions
- Number System
- 12 Progressions
- Cs 101 Comp Science
- caqb1sem5
- 1.1 Number Bases
- CCNA 1 - Modulo 1
- Digital(Logic Gates)
- z80
- Lect-2 Lexical Conventions
- Percentage
- Dld

You are on page 1of 11

1. Write a C program to print all natural numbers from 1 to n. - using while loop

2. Write a C program to print all natural numbers in reverse (from n to 1). - using while loop

3. Write a C program to print all alphabets from a to z. - using while loop

4. Write a C program to print all even numbers between 1 to 100. - using while loop

5. Write a C program to print all odd number between 1 to 100.

6. Write a C program to print sum of all even numbers between 1 to n.

7. Write a C program to print sum of all odd numbers between 1 to n.

8. Write a C program to print table of any number.

9. Write a C program to enter any number and calculate sum of all natural numbers between 1 to n.

10. Write a C program to enter any number and find its first and last digit.

11. Write a C program to enter any number and calculate sum of its digits.

12. Write a C program to enter any number and calculate product of its digits.

13. Write a C program to swap first and last digits of any number.

14. Write a C program to enter any number and print its reverse.

15. Write a C program to enter any number and check whether the number is palindrome or not.

16. Write a C program to enter any number and print it in words.

17. Write a C program to print all ASCII character with their values.

18. Write a C program to find power of any number using for loop.

19. Write a C program to enter any number and find the sum of first and last digit of the number.

20. Write a C program to enter any number and print all factors of the number.

21. Write a C program to enter any number and calculate its factorial.

22. Write a C program to find HCF (GCD) of two numbers.

23. Write a C program to find LCM of two numbers.

24. Write a C program to enter any number and check whether it is Prime number or not.

25. Write a C program to enter any number and check whether it is Armstrong number or not.

26. Write a C program to enter any number and check whether it is Perfect number or not.

27. Write a C program to enter any number and check whether it is Strong number or not.

28. Write a C program to print all Prime numbers between 1 to n.

29. Write a C program to print all Armstrong numbers between 1 to n.

30. Write a C program to print all Perfect numbers between 1 to n.

31. Write a C program to print all Strong numbers between 1 to n.

32. Write a C program to enter any number and print its prime factors.

33. Write a C program to find sum of all prime numbers between 1 to n.

34. Write a C program to print Fibonacci series up to n terms.

35. Write a C program to find one's complement of a binary number.

36. Write a C program to find two's complement of a binary number.

37. Write a C program to convert Binary to Octal number system.

38. Write a C program to convert Binary to Decimal number system.

39. Write a C program to convert Binary to Hexadecimal number system.

40. Write a C program to convert Octal to Binary number system.

41. Write a C program to convert Octal to Decimal number system.

42. Write a C program to convert Octal to Hexadecimal number system.

43. Write a C program to convert Decimal to Binary number system.

44. Write a C program to convert Decimal to Octal number system.

45. Write a C program to convert Decimal to Hexadecimal number system.

46. Write a C program to convert Hexadecimal to Binary number system.

47. Write a C program to convert Hexadecimal to Octal number system.

48. Write a C program to convert Hexadecimal to Decimal number system.

49. Write a C program to print Pascal triangle upto n rows.

50. Star pattern programs - Write a C program to print the given star patterns.

Star patterns are a series of '*' or any other character that are used to create some patterns 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 loops in programming and to

enhance logical thinking capability. Before printing any star pattern you must have knowledge of loops

and basic of pattern printing (Logic to print star patterns and shape).

51. List of various star pattern series * *

and solution in C: *****

***** 8. Hollow right triangle

* * *

**

* *

***

* *

****

***** *****

2. Hollow Square 9. Mirrored right triangle

***** *

**

*****

* *

***** * *

***** *****

3. Rhombus *****

***** ****

* * ***

* * **

* * *

*****

11. Inverted right triangle

4. Hollow Rhombus *****

***** * *

***** * *

***** **

***** *

*****

12. Hollow inverted right triangle

5. Mirrored Rhombus

*****

*****

****

* *

***

* *

**

* *

*

*****

13. Inverted mirrored right triangle

6. Hollow mirrored Rhombus

*****

* * *

** * *

*** **

**** *

*****

14. Hollow inverted mirrored right triangle

7. Right triangle *

* ***

** *****

* * *******

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

15. Pyramid (Equilateral triangle) *******

* *********

* * *******

* * *****

* * ***

********* *

**********

*********

**** ****

*******

*** ***

*****

** **

***

* *

*

* *

17. Inverted Pyramid ** **

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

* * **** ****

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

* *

22. Hollow diamond

*

*****

18. Hollow inverted pyramid ****

* ***

** **

*** *

**** **

***** ***

**** ****

*** *****

**

23. Right Arrow

*

*****

19. Half diamond ****

* ***

** **

*** *

**** **

***** ***

**** ****

*** *****

**

24. Left arrow

*

20. Mirrored half diamond

***** *****

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

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

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

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

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

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

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

********* 25. Heart Star pattern

52. Number pattern programs - Write a C program to print the given number patterns.

Number patterns are logical programs that basically are used to enhance your logical thinking abilities. These

patterns are patterns created by numbers and are similar to star patterns. Enhance your logical thinking abilities

by coding these patterns. Here is a list of basic, advanced, tricky and popular number patterns with logic and

explanation.

01010

Number pattern 3

11111

10001

10001

11111

10001

11111

11111

11111

Number pattern 4

11111

11111

11111

1 1

Number pattern 1

1 1

11111

1 1

00000

11111

11111

Number pattern 5

00000

11111

11111

11111

Number pattern 2

11011

01010

11111

01010

11111

01010

Number pattern 6 12345

10101 12345

01010 12345

10101 12345

10101 12345

11011 34567

11011 45678

00000 56789

11011

Number pattern 8 1 2 3 4 5

6 7 8 9 10

10001 11 12 13 14 15

01010 16 17 18 19 20

00100 21 22 23 24 25

10001 12345

11111 34555

22222 45555

33333 55555

55555 55555

12345 34555

23455 Number pattern 19

12345 55555

12345 33345

23451 22345

34521 12345

54321 54321

54333

12345 54444

21234 55555

43212 12345

54321 22345

54321 44445

43212 55555

21234 555555555

12345 544444445

55555 543222345

54444 543212345

54333 543222345

54322 543333345

54321 544444445

555555555 4444

1 2 3 4 5 22

16 17 18 19 6 1

15 24 25 20 7 Number pattern 28

14 23 22 21 8 11111

13 12 11 10 9 2222

1 44

22 5

4444 11111

55555 2222

1 44

22 5

4444 5

55555 44

55555 2222

4444 11111

22 5

1 44

55555 2222

11111

Number pattern 32 1

21

1 321

12 4321

123 54321

12345 1

Number pattern 33 21

1 321

12 4321

123 54321

12345 54321

12345 321

1234 21

123 1

12 Number pattern 39

1 54321

12345 321

1234 21

123 1

12 Number pattern 40

1 5

Number pattern 36 54

543

54321 5

Number pattern 41 45

5 345

54 2345

543 12345

54321 12345

54321 345

5432 45

543 5

54 Number pattern 47

5 12345

54321 345

5432 45

543 5

54 Number pattern 48

5 1

Number pattern 44 23

5 345

45 4567

345 56789

12345 1

23 9

4567 1

56789 123

56789 1234567

4567 123456789

23 1

1 123

56789 1234567

4567 123456789

23 1

1 24

13579 2468

3579 13579

79 1

9 2 3

Number pattern 53 4 5 6

13579 7 8 9 10

3579 11 12 13 14 15

79

- Simplification and FactorisationUploaded byEbookcraze
- ghsfghdUploaded byapi-3739212
- Laws of Indices school test paperUploaded bydalo0
- 16696Uploaded byAlka Dwivedi
- MELJUN CORTES Computer Science LiteratureUploaded byMELJUN CORTES, MBA,MPA
- sakura.docUploaded bysidartagautama2013
- Chapter 2Uploaded byJunHui Nah
- Hand Reader Technical Manual 2.7Uploaded byWilliam Krieg
- 35 23 Base Logic FunctionsUploaded byJulio Alberto Paz Cordero
- Number SystemUploaded byHarmanWalia
- 12 ProgressionsUploaded byHoe Hockseng
- Cs 101 Comp ScienceUploaded byswamymotappa
- caqb1sem5Uploaded bybaluchandrashekar2008
- 1.1 Number BasesUploaded byYee Wai Mun
- CCNA 1 - Modulo 1Uploaded byVtorC
- Digital(Logic Gates)Uploaded byBibin Lee
- z80Uploaded byTaniaBonitaRosyardi
- Lect-2 Lexical ConventionsUploaded bySahil Sharma
- PercentageUploaded byAhmed Nurul
- DldUploaded byaditya
- Farcas_Madalina_Lab_8_problem_8.txtUploaded byAnonymous xcjV02MyA
- GiroUploaded byBoy Bolang
- Elias.pdfUploaded byAzwar Abdullah
- Binary Coded DecimalUploaded byAhmed Ghreeb
- Unit-2Uploaded byŚę Šhűbhăm Ýāđāv
- 007 Binary-Math-Basics.pdfUploaded byAniket pandey
- 02 part a - plan (1)Uploaded bykp
- DecimalsUploaded byChristina Reyes
- Numerical methods using MATLAB ( PDFDrive.com ).pdfUploaded byauliaism
- Paso1 IndividualUploaded byNatalia Guerra

- BibliographyUploaded bySengottu Velu
- srsUploaded bySengottu Velu
- DiagramsUploaded bySengottu Velu
- Farming Stock Trading Android ApplicationUploaded bySengottu Velu
- Big Data Large Scale Data Processing Using ClustersUploaded bySengottu Velu
- Byzantine Attacks AbstractUploaded bySengottu Velu
- A System to Filter Unwanted Messages From OSN User WallsUploaded bySengottu Velu
- Student Marks DFD MODELUploaded bySengottu Velu
- A Novel Anti Phishing FrameworkUploaded bySengottu Velu
- Authentication Schemes for Session PasswordsUploaded bySengottu Velu
- ALERT an Anonymous Location Based Efficient Routing Protocol in MANETs DocxUploaded bySengottu Velu
- A Pattern-Based Approach for Multi-Class Sentiment Analysis in TwitterUploaded bySengottu Velu
- Portfolio Held WeightageUploaded bySengottu Velu
- BooksUploaded bySengottu Velu
- Arrays Lab ExerciseUploaded bySengottu Velu
- DFD MODEL FOR AIRLINE BOOKING SYSTEMUploaded bySengottu Velu
- Product Marketing Analysis on Public OpinionUploaded bySengottu Velu
- Ewed ScreesnschotsUploaded bySengottu Velu
- A Voltage Regulator for Power Quality Improvement in Low-Voltage Distribution GridsUploaded bySengottu Velu
- Hybrid Energy Storage System Micro Grids Integration For Power Quality ImprovementUploaded bySengottu Velu
- Single-Phase to Three-Phase Unified Power Quality ConditionerUploaded bySengottu Velu
- Catch Me if You CanUploaded bySengottu Velu
- Data Confidential Against Untrusted Servers Using Attribute-based EncryptionUploaded bySengottu Velu
- Latest List of BOOKS.txtUploaded bySengottu Velu
- Titles LISTUploaded bySengottu Velu
- Downlinks TestUploaded bySengottu Velu
- syllabus R2013.pdfUploaded bylogeshboy007
- Capital Budgeting NewUploaded bySengottu Velu

- 1-s2.0-S0377221799002842-mainUploaded byAntonio
- Euler–Bernoulli Beam TheoryUploaded byewb
- JordanUploaded bymarivel77
- Evolutionary Adaptive Active Vibration ControlUploaded byoscar201140
- Nonlinear Flight Control DesignUploaded byIvan Ramirez
- Exercise 6 - State-space ModelsUploaded byanass sbni
- Column Buckling: Design Using Euler TheoryUploaded byadi_ganteng12
- FP2 Solomon a QPUploaded byJimlon0
- m3_nat_wpwb.pdfUploaded byJayD.Zarza
- Modified Nodal AnalysisUploaded byNijil Kadavathu Valapil
- ABAP ExercisesUploaded byRoxana Moldovan
- An algorithm for extracting primesUploaded byJess
- 1-5 ws gUploaded byapi-262703885
- Cours LicciardiUploaded byYaseen Muhammad
- 24142Uploaded byShikha Agarwal
- Introduction to ProbabilityUploaded byRochana Ramanayaka
- Marc Porter Zasada - Mathematics of BeautyUploaded byMarc Porter Zasada
- CombinationsUploaded byRusiliza Mallorca Almuete
- THE FINITE STRIP METHOD IN THE ANALYSIS OF OPTIMAL RECTANGULAR BENDING BRIDGE PLATES.pdfUploaded byAravind Bhashyam
- BabylonUploaded byderzelas
- Lukierski Hopf AlgebraUploaded bybayareaking
- expression equationsUploaded byapi-250124002
- part1.1-3.pdfUploaded byJeetendra Kumar
- e5 QuestionsUploaded byRamchandra Murthy
- MATLAB FEM Code - From Elasticity to PlasticityUploaded byVitor Anes
- Matlab practicoUploaded byKarlita M.
- Matlab TutorialUploaded bySachin Khandare
- The Motion Emountain Cap 1Uploaded byAndres Nipaz
- Non-linear Independent Components EstimationUploaded byJan Hula
- Three Dimensional Static Solutions for Single Layer Piezoelectric PlatesUploaded bySameer Sawarkar

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.