TUTORIALS

C Programming: Basic Programs

  1. C Program to print Hello World on the console
  2. C Program to initialize different datatypes and print the same on terminal
  3. C Program to show different formatting in output using printf
  4. C Program to convert a value into different formats using format specifiers
  5. C Program to find the sum of two integer numbers
  6. C Program to find the difference of two integer numbers
  7. C Program to find the product of two integer numbers
  8. C Program to find the division of two integer numbers
  9. C Program to perform arithmetic operations using floating point variables
  10. C Program to find distance between two straight lines
  11. C Program to find area of square
  12. C Program to find perimeter of square
  13. C Program to find area of rectangle
  14. C Program to find perimeter of rectangle
  15. C Program to find area of equilateral triangle
  16. C Program to find area of right angled triangle
  17. C Program to find area of scalene triangle
  18. C Program to find area of triangle given three sides of a triangle
  19. C Program to find area of circle
  20. C Program to find area and circumference of a circle using pre processor directives
  21. C Program to check if a triangle is Isosceles Equilateral or Scalene
  22. C Program to convert Celcius to Fahrenheit
  23. C Program to convert Fahrenheit to Celcius
  24. C Program to swap two variables using addition and subtraction without using temporary variable
  25. C Program to swap two variables using temporary variable
  26. C Program to swap two variables using multiply and division operation without using temporary variable
  27. C Program to swap two variables by shifting bits
  28. C Program to swap two variables by performing xor operation
  29. C Program to calculate Simple Interest
  30. C Program to calculate Compound Interest
  31. C Program to find profit or loss
  32. C Program to find positive negative or zero using Conditional Operator
  33. C Program to find positive negative or zero using If Else statement
  34. C Program to find odd or even using Conditional Operator
  35. C Program to find odd or even using If Else statement
  36. C Program to find odd or even using goto statement
  37. C Program to check whether a given year is a leap year or not
  38. C Program to check whether a given number is a Perfect Number or not
  39. C Program to check whether a given number is an Armstrong Number or not
  40. C Program to generate Armstrong number within a given range
  41. C Program to check whether a given number is an Armstrong Number or not using user defined power function
  42. C Program to check whether a given number is an Armstrong Number or not using in built power function
  43. C Program to find biggest of two numbers using Conditional Operator
  44. C Program to find biggest of two numbers using If Else statement
  45. C Program to find biggest of three numbers using Conditional Operator
  46. C Program to find biggest of three numbers using If Else statement
  47. C Program to find biggest of three numbers using nested If Else statement
  48. C Program to find biggest of three numbers using Binary Minus
  49. C Program to find smallest of three numbers using Conditional Operator
  50. C Program to find smallest of three numbers using If Else statement
  51. C Program to find smallest of three numbers using nested If Else statement
  52. C Program to calculate grade based on percentage using If Else statement
  53. C Program to calculate grade based on percentage using switch statement
  54. C Program for simple calculator to perform addition subtraction multiplication and division based on the symbol using if else ladder statement
  55. C Program for simple calculator to perform addition subtraction multiplication and division based on the symbol using switch statement
  56. C Program to find roots of a quadratic equation using If Else statement
  57. C Program to find area of triangle square circle or rectangle using switch statement
  58. C Program to demonstrate the use of sizeof operator
  59. C Program to identify a character or a digit using ASCII values
  60. C Program to identify a character digit or special character using Built In functions
  61. C Program to identify a character or a digit using Built In functions
  62. C Program to convert lower case alphabet to upper case and upper case to lower case using ASCII values
  63. C Program to convert lower case alphabet to upper case and upper case to lower case using Built In functions
  64. C Program to print first n natural numbers using for loop
  65. C Program to print first n natural numbers using while loop
  66. C Program to print first n natural numbers using do while loop
  67. C Program to find the sum of first n natural numbers using for loop
  68. C Program to find the sum of first n natural numbers using while loop
  69. C Program to sum of n natural numbers using do while
  70. C Program to find the factorial of a given number
  71. C Program to find factorial of a number using functions
  72. C Program to find GCD and LCM of a given two number
  73. C Program to generate Fibonacci Series for first n natural numbers
  74. C Program to check whether a given integer number is palindrome or not
  75. C Program to print first n prime numbers
  76. C Program to print prime numbers within given range
  77. C Program to check if a number is prime number or not
  78. C Program to reverse a given integer number using while loop
  79. C Program to reverse a given integer number using while loop using functions
  80. C Program to reverse an integer number using for
  81. C Program to reverse an integer number using do while
  82. C Program to reverse string using for
  83. C Program to reverse string using while
  84. C Program to reverse string using do while
  85. C Program to print random number
  86. C Program to print random number within range
  87. C Program to check anagram by checking frequency
  88. C Program to check anagram by sorting strings
  89. C Program to find area of Ellipse
  90. C Program to find area of Regular Polygon sides
  91. C Program to find area of Rhombus
  92. C Program to find area of Sector
  93. C Program to find area of Triangular Prism lateral surface
  94. C Program to find the area of a pentagon
  95. C Program to find area of trapezoid
  96. C Program to print hello world using ASCII
  97. C Program to find power of a number without inbuilt function
  98. C Program to find substring of a string
  99. C Program to swap two Strings
  100. C Program to search occurrence of character in String
  101. C Program to sort a set of strings alphabetically
  102. C Program to arrange a string alphabetically
  103. C Program to find length of a string using built in functions
  104. C Program to find length of a string without using built in functions
  105. C Program to find if a string is palindrome or not without built in functions
  106. C Program to compare two strings using built in functions
  107. C Program to compare two strings without using built in functions
  108. C Program to reverse a string without using built in function
  109. C Program to convert String to Integer value
  110. C Program to find Permutations nPr
  111. C Program to find Combinations nCr
  112. C Program to find sum and percentage of subjects
  113. C Program to find Sum of Digits of a given number Type 1
  114. C Program to find Sum of Digits of a given number Type 2
  115. C Program to concatenate two strings using built in functions
  116. C Program to concatenate two strings into a third string using built in functions
  117. C Program to concatenate two strings into a third string without using built in functions
  118. C Program to copy from source string to destination string using built in functions
  119. C Program to copy from source string to destination string without using built in functions
  120. C Program to find sum of two numbers using command line arguments
  121. C Program to find sum of two numbers using functions with returning the value
  122. C Program to find sum of two numbers using functions without returning the value
  123. C Program to print first n odd numbers
  124. C Program to print first n even numbers
  125. C Program to print n odd numbers within range
  126. C Program to print n even numbers within range
  127. C Program to print first n odd and even numbers Type 1
  128. C Program to print first n odd and even numbers Type 2
  129. C Program to find the sum of first n odd numbers using for loop
  130. C Program to print the sum of n odd numbers using while
  131. C Program to print the sum of n odd numbers using do while
  132. C Program to print the sum of n odd numbers within range using for
  133. C Program to print the sum of n odd numbers within range using while
  134. C Program to print the sum of n odd numbers within range using do while
  135. C Program to find the sum of first n even numbers using for loop
  136. C Program to print the sum of n even numbers using while
  137. C Program to print the sum of n even numbers using do while
  138. C Program to print the sum of n even numbers within range using for
  139. C Program to print the sum of n even numbers within range using while
  140. C Program to print the sum of n even numbers within range using do while
  141. C Program to find the sum of first n odd and even numbers using for
  142. C Program to print the sum of n odd and even numbers using while
  143. C Program to print the sum of n odd and even numbers using do while
  144. C Program to print the sum of n odd and even numbers within range using for
  145. C Program to print the sum of n odd and even numbers within range using while
  146. C Program to print the sum of n odd and even numbers within range using do while
  147. C Program to convert binary to decimal number
  148. C Program to convert binary to hexadecimal number
  149. C Program to convert binary to octal number
  150. C Program to convert a decimal to binary number
  151. C Program to convert decimal to hexadecimal number
  152. C Program to convert a decimal to octal number
  153. C Program to convert octal to binary number
  154. C Program to convert an octal to decimal number
  155. C Program to convert octal to hexadecimal number
  156. C Program to convert Kilometers to miles
  157. C Program to convert kilometer to miles using preprocessor directive
  158. C Program to demonstrate calloc dynamic memory allocation
  159. C Program to demonstrate malloc dynamic memory allocation
  160. C Program to demonstrate malloc memset
  161. C Program to initialize array of strings and print on the terminal
  162. C Program to insert an element into specified location of an array
  163. C Program to delete an element from a specified location of an array
  164. C Program to delete duplicate elements from an array
  165. C Program to copy contents of one array to another
  166. C Program to find maximum element in an array without sorting
  167. C Program to find minimum element in an array without sorting
  168. C Program to merge two arrays one after the other
  169. C Program to find the sum of array elements
  170. C Program to find sum of two arrays
  171. C Program to search a key element using Binary Search method
  172. C Program to search a key element using Binary Search using Functions
  173. C Program to search a key element using Linear Search method
  174. C Program to search a key element using Linear Search using Functions
  175. C Program to add two matrix
  176. C Program to subtract two matrix
  177. C Program to find sum of lower triangle matrix
  178. C Program to find sum of upper triangle matrix
  179. C Program to add principal diagonal elements in a matrix
  180. C Program to transpose a matrix
  181. C Program to check if the entered matrix is magic square or not