List of “C” Program

Part - I 1. /* Write a C program to find the area of a triangle, given three sides*/ 2. /* Write a C program to find the area of a circle, given the radius*/ 3. /* Write a C program to find the simple interest , given principle, * rate of interest and times*/ 4. /* Write a C program to check whether a given integer is odd or even*/ 5. /* Write a C program to check whether a given integer * number is positive or negative*/ 6. /* Write a C program to find the biggest of three numbers*/ 7. /* write a C program to find and output all the roots of a * * quadratic equation, for non-zero coefficients. In case * * of errors your program should report suitable error message*/ 8. /* Write a C program to simulate a simple calculator to perform * * arithmetic operations like addition, subtraction, multiplication * * and division only on integers. Error message should be reported * * if any attempt is made to divide by zero */ 9. /* Write a C program to find the sum of 'N' natural numbers*/ 10. /*Write a C program to generate and print first N FIBONACCI numbers*/ 11. /* Write a C program to find the GCD and LCM of two integers * output the results along with the given integers. Use Euclids' algorithm*/ 12. /* Write a C program to find the sum of odd numbers and * * sum of even numbers from 1 to N. Output the computed * * sums on two different lines with suitable headings */ 13. /* Write a C program to reverse a given integer number and check * * whether it is a palindrome. Output the given numbers with suitable* * message */ 14. /* Write a C program to find the value of sin(x) using the series * * up to the given accuracy (without using user defined function) * * Also print sin(x) using library function. */ 15. /* Write a C program to find the value of cos(x) using the series * * up to the given accuracy (without using user defined function) * * Also print cos(x) using library function. */ 16. /* Write a C program to check whether a given number is prime or not * * and output the given number with suitable message */ 17. /* Write a C program to generate and print prime numbers in a given * * range. Also print the number of prime numbers */ 18. /* Write a C program to find the number of integers divisible by 5 * * between the given range N1 and N2, where N1 < N2 and are integers.* * Also find the sum of all these integer numbers that divisible by 5* * and output the computed results */ 19. /* Write a C program to read N integers (zero, +ve and -ve) * * into an array A and to * * a) Find the sum of negative numbers * * b) Find the sum of positive numbers and * * c) Find the average of all input numbers * * Output the various results computed with proper headings */ 20. /* Write a C program to input N numbers (integers or reals) * * and store them in an array. Conduct a linear search for a * * given key number and report success or failure in the form * * of a suitable message */ 21. /* Write a C program to sort N numbers in ascending order * * using Bubble sort and print both the given and the sorted * * array with suitable headings */

/* Write a C program to read a string and check whether it is * * a palindrome or not (without using library functions). */ 28. /* Write a C program to evaluate the given polynomial * * P(x)=AnXn + An-1Xn-1 + An-2Xn-2+. /* Write a C program to accept N numbers sorted in ascending order * * and to search for a given number using binary search. Report * * sucess or fialure in the form of suitable messages */ 23. variance and standard deviation */ 24. +A1X + A0.. /* Write a C program to read in four integer numbers into an array * * and find the average of largest two of the given numbers without * * sorting the array. by * * reading its coefficents into an array. Find the * * trace of the resultant matrix. to* * output the given matrices and the computed matrix in a * * main function */ . Output the concatenated * * string along with the given string */ 30. */ 31.. Output * * the given sentence as well as the case covrted sentence on* * two different lines. /* Write a C program to read two matrices A (MxN) and B(MxN)* * and perform addition OR subtraction of A and B. /* Write a C program to read N names. /* Write a C program read a sentence and count the number of * * number of vowels and consonants in the given sentence. /* Write a C program to read A (MxN). */ 25.. /* Write a C program to read an English sentence and replace* * lowercase characters by uppercase and vice-versa. Output the given matrix. store them in the form * * of an array and sort them in alphabetical order. * * their sum or Differences and the trace.22. /* Write a C program to input real numbers and find the * * mean. * * Output the results on two lines with suitable headings */ 32. The program should output the given four numbers* * and the average with suitable headings. /* Write a C program to sort given N elements using SELECTION sort method * * using functions * * a) To find maximum of elements * * b) To swap two elements */ 34. [Hint:Rewrite * * the polynomial as * * P(x) = a0 + x(a1+x(a2+x(a3+x(a4+x(. find the transpose * * of a given matrix and output both the input matrix and* * the transposed matrix. Output * * the given string along with suitable message */ 29.. /* Write a C program to read two strings and concatenate them * * (without using library functions). */ 27.x(an-1+xan)))) * * and evalate the function starting from the inner loop]*/ 26. Output the* * give names and the sorted names in two columns side by side* * wih suitable heading */ 33. to compute the product of the two matrices. /* Develop functions * * a) To read a given matrix * * b) To output a matrix * * c) To compute the product of twomatrices * * Use the above functions to read in two matrices A (MxN)* * B (NxM).

/* Write a c program to compute the surface area and * * volume of a cube */ 46. /* Program to accept two strings and concatenate them * * i. /* Write a C program to generate Fibonacci sequence * * Fibonacci sequence is 0 1 1 2 3 5 8 13 21 . */ 41. instead that character is replaced by '*' */ 44. /* Write a C program to convert the given binary number into decimal */ 39. The password that you enter will not be * * displayed. weeks and days. It asks for the user name and then the * * password. Display the contents of OAR and EAR */ 40. Output the given array and * * and the computed sum with suitable heading */ Part – II 38.The second string is appended to the end of the first string */ 51. * The odd elements in the AR are copied into OAR and other elements * are copied into EAR. /* Write a c program to find the length of a string * without using the built-in function also check .. /* Program to accepts two strings and compare them. For example 375 days is equal to 1 year * 1 week and 3 days (ignore leap year) */ 49. /* Write a c program to compute the surface area and * * volume of a cube */ 47. /* Write a C program to read two integers M and N * * and to swap their values. Don't use either the * * temporary variable or arithmetic operators / 48. Finally it prints * * whether both are equal. /* Write a c program to swap the contents of two numbers * * using bitwise XOR operation..35. /* Write a C program to read N integers and store them * * in an array A./* Write a C program to read a matrix A (MxN) and to find the * * following using functions * * a) Sum of the elements of each row * * b) Sum of the elements of each column * * c) Find the sum of all the elements of the matrix * * Output the computed results with suitable headings */ 36. and so find the sum of all these * * elements using pointer. /* Write a C program to accept a string and a substring and check if the substring is present in the given strig */ 45. /* Program to accept N integer number and store them in an array AR. /* This program is to illustrate how user authentication * * is made before allowing the user to access the secured * * resources. /* Write a c program to find the length of a string * * without using the built-in function */ 52. /* Write a C program to accept an integer and reverse it */ 43. Output the values of * * M and N before and after swapping with suitable* * mesages */ 37. or first string is greater than the second * * or the first string is less than the second string */ 50.e. Use a user-defined * * function for swapping. /* Write a c program to convert given number of days to a measure of time * given in years. /* Write a C program to insert a particular element in a specified position * * in a given array */ 42.

/* Write a C program to implement stack.e. /* Write a C program to accept a list of data items and find the second largest and second smallest elements in it. /* Write a C program to accept an array of integers and delete the specified integer from the list */ 68. /* Write a c program to multifly given number by 4 * * using bitwise operators */ 61. Add the first half to the end of second half*/ 69. /* Write a C program to accept a figure code and find the ares of different * * geometrical figures such as circle. quantity and * * manufacturing date of each item. then print SUPER * if code is A. */ Part – III 58. /* Write a C programme (1-D Array) store some elements in it. the content of A1 become that of A2. /* Write a C program to accept a matrix of given order and interchnge any two rows and columns in the original matrix*/ 57. /* Write a C program to accept a coordinate point in a XY coordinate system * and determine its quadrant */ 75. /* Write a C program to compute the value of X ^ N given X and N as inputs */ 55. * i.* whether it is a palindrome or not */ 53. /* Write a C program to accept a matrix of order M x N and store its elements * * and interchange the main diagonal elements of the matrix * with that of the secondary diagonal elements */ 71. /* Write a C program to find the sum of first 50 natural numbers * * using for loop */ 72. then print ABSENT . Display appropriate message on successful search. /* Write a C program to find the frequency of odd numbers and even numbers in the input of a matrix */ 70. And search for the average value whether it is present in the array or not. */ 67. POP(Delete operation) and Display stack */ 59. /* Write a C program to accept N numbers and arrange them in an asceding order */ 65. /* Write a C program to accept a set of numbers and arrange them in a descending order */ 66. varience and standard deviation */ 64. /* Write a C Program to accept a grade and declare the equivalent descrption * if code is S. then print VERY GOOD * if code is B. /*Write a C Program to check if a given matrix is an identity matrix */ 56. then print FAIR * if code is Y.Accept key & split from that point. rectangle etc using switch */ 76. Stack is a LIFO data strcuture * * LIFO . /* Write a C program to accept two integers and check if they are equal */ 73. /* Writ a C programme to cyclically permute the elements of an array A. square. /* Write a C program to accept the height of a person in centermeter and * * categorize the person based on height as taller. /* Write a C program to accept a string and find the number of times the word 'the' appears in it*/ 54. /* Write a C program to find the sum of cos(x) series */ 62.And A2 contains that of A3 * & so on as An contains A1 */ 63. /* Write a C program to accept a set of numbers and compute mean. And also computer the average of both. dwarf and * * average height person */ 74. price. /* Write a C program to convert the given binary number into its equivalent decimal */ 60. /* Write a C program to display the inventory of items in a store/shop * * The inventory maintains details such as name.Last in First Out * * Perform PUSH(insert operation).

Last in First Out * * Perform PUSH(insert operation). /* Write a C program to accept an array of 10 elements and swap 3rd * element with 4th element using pointers. /* Write a C program to accept an integer find the sum of the digits in it */ 80. then print FAILS */ 77. /* Write a C program to find the size of a union*/ 93. /* Write a C program to find the sum of two one-dimensional arrays using * * Dynamic Memory Allocation */ 89. /* Write a C program to accept a matrix of order M x N and find the sum * * of each row and each column of a matrix */ 81. * * Otherwise. /* Write a C program to create a linked list and display the elements in the list. * * Then it searches for the desired element. /* Write a C program to create a file called emp. */ 96. /* Write a C program to accept a string and find the sum of * * all digits present in the string */ 79. it displays "SUCCESSFUL SEARCH". */ 94. A sparse martix is matrix which * * has more zero elements than nonzero elements */ 85. /* Write a C program to illustrate the concept of unions*/ 92. in terms of his name. /* Write a C program to find the sum of all elements of * * an array using pointersas arguments */ 90. POP(Delete operation) and Display stack */ . /* Write a C program to accept a matric and determine whether * * it is a sparse matrix. /* Write a C program to implement stack.rec and store information * * about a person. a message "UNSUCCESSFUL SEARCH" is displayed. /* Write a C program to accept a matricx of order MxN and find the trcae and * * normal of a matrix HINT:Trace is defined as the sum of main diagonal * * elements and Normal is defined as squre root of the sum of all * * the elements */ 83.*/ 97. /* This program accepts an array of N elements and a key. Use structures to store the names */ 87. /* Write a C Program to convert the lower case letters to upper case * * and vice-versa */ 88. /* Write a C program to accept a amtric of order MxN and sort all rows * of the matrix in ascending order and all columns in descendng order */ 86. age and salary. /* Write a C program to find accept a matric of order M x N and find * * the sum of the main diagonal and off diagonal elements */ 82. /* Write a C program to accept a set of names and sort them in * * an alphabetical order. /* Write a C program to illustrate the operations of singly linked list */ 98. And display the results */ 91. /*Write a C program to illustrate as to how the data stored on the disk is read */ 95. /* Write a C program to accept a matric of order MxN and find its transpose */ 84. Stack is a LIFO data strcuture * * LIFO . /* Write a C program to find the factorial of a given number */ 78.* if code is F. If the search * * is successful.