0% found this document useful (0 votes)
1 views

C Program

The document is a comprehensive list of C programming examples covering various topics such as basic programs, control flow, pattern printing, functions, arrays, strings, conversions, pointers, structures, file I/O, and date and time. Each section includes multiple specific programs that demonstrate different programming concepts and techniques. This serves as a valuable resource for learning and practicing C programming.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

C Program

The document is a comprehensive list of C programming examples covering various topics such as basic programs, control flow, pattern printing, functions, arrays, strings, conversions, pointers, structures, file I/O, and date and time. Each section includes multiple specific programs that demonstrate different programming concepts and techniques. This serves as a valuable resource for learning and practicing C programming.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

1.

C Program – Basic

2. C Hello World Program

3. C Program to Print Your Own Name

4. C Program to Print an Integer Entered By the User

5. C Program to Add Two Numbers

6. C Program to Check Whether a Number is Prime or Not

7. C Program to Multiply two Floating-Point Numbers

8. C Program to Print the ASCII Value of a Character

9. C Program to Swap Two Numbers

10.C Program to Calculate Fahrenheit to Celsius

11.C Program to Find the Size of int, float, double, and char

12.C Program to Add Two Complex Numbers

13.C Program to Print Prime Numbers From 1 to N

14.C Program to Find Simple Interest

15.C Program to Find Compound Interest

16.C Program for Area And Perimeter Of Rectangle

C Program – Control Flow

17.C Program to Check Whether a Number is Positive, Negative, or

Zero

18.C Program to Check Whether Number is Even or Odd

19.C Program to Check Whether a Character is Vowel or Consonant


20.C Program to Find Largest Number Among Three Numbers

21.C Program to Calculate Sum of Natural Numbers

22.C Program to Print Alphabets From A to Z Using Loop

23.C Program to Check Leap Year

24.C Program to Find Factorial of a Number

25.C Program to Make a Simple Calculator

26.C Program to Generate Multiplication Table

27.C Program to Print Fibonacci Series

28.C Program to Find LCM of Two Numbers

29.C Program to Check Armstrong Number

30.C Program to Display Armstrong Numbers Between 1 to 1000

31.C Program to Display Armstrong Number Between Two Intervals

32.C Program to Reverse a Number

33.C Program to Check Whether a Number is a Palindrome or Not

34.C Program to Check Whether a Number is Prime or Not

35.C Program to Display Prime Numbers Between Intervals

36.C Program to Check whether the input number is a Neon Number

37.C Program to Find All Factors of a Natural Number

38.C program to Sum of Fibonacci Numbers at Even Indexes up to N

Terms

C Program – Pattern Printing


39.C Program to Print Simple Pyramid Pattern

40.C Program to Print Given Triangle

41.C Program to Print 1800 Rotation of Simple Pyramid

42.C Program to Print Inverted Pyramid

43.C Program to Print Number Pattern

44.C Program to Print Character Pattern

45.C Program to Print Continuous Character Pattern

46.C Program to Print Hollow Star Pyramid

47.C Program to Print Inverted Hollow Star pyramid

48.C Program to Print Hollow Star Pyramid in a Diamond Shape

49.C Program to Print Full Diamond Shape Pyramid

50.C Program to Print Pascal’s Pattern Triangle Pyramid

51.C Program to Print Floyd’s Pattern Triangle Pyramid

52.C Program to Print Reverse Floyd pattern Triangle Pyramid

C Program – Functions

53.C Program to Check Prime Number By Creating a Function

54.C Program to Display Prime Numbers Between Two Intervals Using

Functions

55.C Program to Find All Roots of a Quadratic Equation

56.C Program to Check Whether a Number can be Express as Sum of

Two Prime Numbers


57.C Program to Find the Sum of Natural Numbers using Recursion

58.C Program to Calculate the Factorial of a Number Using Recursion

59.C Program to Find G.C.D Using Recursion

60.C Program to Reverse a Stack using Recursion

61.C Program to Calculate Power Using Recursion

C Program – Arrays

62.C Program to Print a 2D Array

63.C Program to Find the Largest Element in an Array

64.C Program to Find the Maximum and Minimum in an Array

65.C Program to Search an Element in an Array (Binary search)

66.C Program to Calculate the Average of All the Elements Present in

an Array

67.C Program to Sort an Array using Bubble Sort

68.C Program to Sort an Array using Merge Sort

69.C Program to Sort an Array Using Selection Sort

70.C Program to Sort an Array Using Insertion Sort

71.C Program to Sort the Elements of an Array in Descending Order

72.C Program to Sort the Elements of an Array in Ascending Order

73.C Program to Remove Duplicate Elements From a Sorted Array

74.C Program to Merge Two Arrays

75.C Program to Remove All Occurrences of an Element in an Array


76.C Program to Find Common Array Elements

77.C Program to Copy All the Elements of One Array to Another Array

78.C Program For Array Rotation

79.C Program to Sort the 2D Array Across Rows

80.C Program to Check Whether Two Matrices Are Equal or Not

81.C Program to Find the Transpose

82.C Program to Find the Determinant of a Matrix

83.C Program to Find the Normal and Trace

84.C Program to Add Two Matrices

85.C Program to Multiply Two Matrices

86.C Program to Print Boundary Elements of a Matrix

87.C Program to Rotate Matrix Elements

88.C Program to Compute the Sum of Diagonals of a Matrix

89.C Program to Interchange Elements of First and Last in a Matrix

Across Rows

90.C Program to Interchange Elements of First and Last in a Matrix

Across Columns

C Program – Strings

91.C Program to Add or Concatenate Two Strings

92.C Program to Add 2 Binary Strings


93.C Program to Get a Non-Repeating Character From the Given

String

94.C Program to check if the string is palindrome or not

95.C Program to Reverse an Array or String

96.C program to Reverse a String Using Recursion

97.C Program to Find the Length of a String

98.C Program to Sort a String

99.C Program to Check For Pangram String

100. C Program to Print the First Letter of Each Word

101. C Program to Determine the Unicode Code Point at a Given

Index

102. C Program to Remove Leading Zeros

103. C Program to Compare Two Strings

104. C Program to Compare Two Strings Lexicographically

105. C Program to Insert a String into Another String

106. C Program to Split a String into a Number of Sub-Strings

C Program – Conversions

107. C Program For Boolean to String Conversion

108. C Program For Float to String Conversion

109. C Program For Double to String Conversion

110. C Program For String to Long Conversion


111. C Program For Long to String Conversion

112. C Program For Int to Char Conversion

113. C Program For Char to Int Conversion

114. C Program For Octal to Decimal Conversion

115. C Program For Decimal to Octal Conversion

116. C Program For Hexadecimal to Decimal Conversion

117. C Program For Decimal to Hexadecimal Conversion

118. C Program For Decimal to Binary Conversion

119. C Program For Binary to Decimal Conversion

C Program – Pointers

120. How to Return a Pointer from a Function in C

121. How to Declare a Two-Dimensional Array of Pointers in C?

122. C Program to Find the Largest Element in an Array using

Pointers

123. C Program to Swap Two Numbers

124. C Program to Sort an Array using Pointers

125. C Program to Sort a 2D Array of Strings

126. C Program to Check if a String is a Palindrome using Pointers

127. C Program to Create a Copy of a Singly Linked List using

Recursion

C Program – Structures and Unions


128. C Program to Store Information of Students Using Structure

129. C Program to Store Student Records as Structures and Sort them

by Name

130. C Program to Add N Distances Given in inch-feet System using

Structures

131. C Program to Add Two Complex Numbers by Passing Structure

to a Function

132. C Program to Store Student Records as Structures and Sort them

by Age or ID

133. Read/Write Structure to a File in C

134. Flexible Array Members in a Structure in C

C Program – File IO

135. C Program to Create a Temporary File

136. C Program to Read/Write Structure to a File

137. C Program to Rename a file

138. C Program to Make a File Read-Only

139. C program to Compare Two Files and Report Mismatches

140. C Program to Copy One File into Another File

141. C Program to Print all the Patterns that Match Given Pattern

From a File

142. C Program to Append the Content of One Text File to Another


143. C Program to Read Content From One File and Write it Into

Another File

144. C Program to Read and Print all Files From a Zip File

C Program – Date and Time

145. C Program to Format time in AM-PM format

146. C program to Print Digital Clock with the Current Time

147. C Program to Display Dates of Calendar Year in Different

Formats

148. C Program to Display Current Date and Time

149. C Program to Maximize Time by Replacing ‘_’ in a Given 24-

Hour Format Time

150. C Program to Convert the Local Time to GMT

151. C Program to Convert Hours into Minutes and Seconds

152. C Program – More C Programs

153. C Program to Show Runtime exceptions

154. C Program to Show Types of errors

155. C Program to Show Unreachable Code Error

156. C Program to Find Quotient and Remainder

157. C Program to Find the Initials of a Name

158. C Program to Draw a Circle in Graphics

159. Printing Source Code of a C Program Itself

You might also like