C programs

1. Write a program in C to find the sum of the series 1 +11 + 111 + 1111 + .. n terms

2. Write a c program to check whether a given number is a perfect number or not.

3. Write a C program to determine whether a given number is prime or not.

4. Write a C program to convert days into years, month and days.

5. Write a C program to find LCM of two numbers using GCD.

6. Write a C program to accept an integer & find the sum of its digits.

7. Write a C program to check whether a triangle can be formed by the given value for the angles.

8. Write a C program to find the largest element of a given array.

9. Write a C code to print the largest and the second largest element of an array.

10. Write a C program to divide an array into two arrays of even and odd elements.

11. Write a C code to find the number of times a particular element (num) exist in an array.

12. Write a C program for calculator program with Basic operations (+, -, *, /,%) of two numbers using switch statement.

13. Write a C program to replace EVEN and ODD elements by 0 and 1 in an array.

14. Write a C program to merge two one dimensional array elements in one dimensional third array.

15. Write a C program to add and subtract of two one dimensional array elements and store it in a third and fourth one dimensional array and print it.

16. Write a C Program to Calculate mean of 10 numbers.

17. Write a C program to calculate Sum and Product of all Elements in an array.

18. Write a C program to find the first repeated element in an array.

19. Write a C code to count the number of negative elements in a 2D matrix.

20. Write a C code which computes and prints the sum of each rows of a 2D Matrix.

21. Complete the code which reads a square matrix a[n][n] and print only the elements that falls in the diagonal starting from a[0][0] to a[n][n] and all other elements printed as 0 (zero).

22. Write a C program to count frequency of each element of an array. 

23. Write a C program to find number of blank space in a sentence(Do not use the strlen() function).

24. Write a C program to find the transpose of a matrix.

25. Write a C program to count total number of vowel or consonant in a string.

26. Write a C code to find the difference between two matrices of any order and  print the result in matrix format.

27. Write a C code to check whether a given string is palindrome or not.

28. Write a C code to reverse a string without using any string library functions.

29. Write a C code to concatenate two strings.

30. Write a C code to compare two strings.

31. Write a C code to add and subtruct two one dimensional array of size 5 using function addarray() and subtractarray().

32. Write a C code to read a number and check whether it is prime. A function isPrime() is used here.

33. Write C code to check the number is a Perfect Number. A function isPerfect is used here.

34. Write a C program to search a number in an array using Binary search algorithm.

35. Write a C program to search a number in an array using Linear search algorithm.

36. Write a C program to sort an array using Selection Sort.

37. Write a C program to sort an array using Insertion sort.

38. Write a C program to sort an array using Bubble sort.

39. Write a C program which find the student name who obtain the highest marks.

40. Write a C program to perform Multiplication of two matrixes.

41. Write a C program to find the transpose of a given matrix.

42. Write a C program to find out the Sum of the diagonal elements of a matrix.

43. Write a C program to find average using findavg() function.

44. Write a C program to pass multidimensional array to a function as it's parameter.

45. Write a C program which sort strings in lexicographical order.

46. Write a C program which will sort number of elements in an ascending by using bubble sort using pointer.

47. Write a C Program to find if the given square matrix is skew symmetric or not.

48. Write a C program to swap two integers using pointers.

49. Write a program in C to add two numbers using pointers.

50. Write a C program which will generate Fibonacci sequence using recursive function printFibonacci(int n).

51. Write a C program to find a root of the equation a*x*x + b*x +c using Bi Section method.

52. Write a C program to insert an element / item in the sorted array.

53. Write a C program to calculate factorial of a number using recursion.

54. Write a C program to print the solution of the series  f(n)= (1) + (2*3) + (4*5*6) ... upto n terms using recursion.

55. Write a program in C to count the number of digits of a given number using recursion.

56. Write a program in C to find GCD of two numbers using recursion.

57. Write a program in C to convert a decimal number to binary using recursion.


No comments:

Post a Comment

Write a program in C to convert a decimal number to binary using recursion.

 Source code: //Write a program in C to convert a decimal number to binary using recursion. #include<stdio.h> long convertB_to_D(int d...