1.

Write a C program to find the sum of individual digits of a positive integer.

  • Computer Programming Lab
  • 81,837
  • Nov 23, 2014
2.

A Fibonacci sequence is defined as follows: the first and second terms in the sequence are 0 and 1. Subsequent terms are found by adding the preceding two terms in the sequence. Write a C program to generate the first n terms of the sequence.

  • Computer Programming Lab
  • 26,944
  • Nov 23, 2014
3.

Write a C program to generate all the prime numbers between 1 and n, where n is a value supplied by the user.

  • Computer Programming Lab
  • 62,645
  • Nov 23, 2014
4.

Write a C program to calculate the following Sum:
Sum=1-x2/2! +x4/4!-x6/6!+x8/8!-x10/10!

  • Computer Programming Lab
  • 27,900
  • Dec 24, 2014
5.

Write a C program to find the roots of a quadratic equation.

  • Computer Programming Lab
  • 112,340
  • Dec 24, 2014
6.

The total distance travelled by vehicle in ‘t’ seconds is given by distance = ut+1/2at2 where ‘u’ and ‘a’ are the initial velocity (m/sec.) and acceleration (m/sec2). Write C program to find the distance travelled at regular intervals of time given the values of ‘u’ and ‘a’. The program should provide the flexibility to the user to select his own time intervals and repeat the calculations for different values of ‘u’ and ‘a’.

  • Computer Programming Lab
  • 43,294
  • Jun 07, 2017
7.

Write a C program, which takes two integer operands and one operator from the user, performs the operation and then prints the result. (Consider the operators +,-,*, /, % and use switch statement)

  • Computer Programming Lab
  • 75,848
  • Dec 25, 2014
8.

Write C programs that use both recursive and non-recursive functions

  1. To find the factorial of a given integer.
  2. To find the GCD (greatest common divisor) of two given integers.
  • Computer Programming Lab
  • 58,385
  • Dec 25, 2014
9.

Write a C program to find the largest integer in a list of integers.

  • Computer Programming Lab
  • 26,216
  • Dec 25, 2014
10.

Write a C program that uses functions to perform the following:

  1. Addition of Two Matrices
  2. Multiplication of Two Matrices
  • Computer Programming Lab
  • 25,056
  • Dec 25, 2014
11.

Write a C program that uses functions to perform the following operations:

  1. To insert a sub-string in to a given main string from a given position.
  2. To delete n Characters from a given position in a given string.
  • Computer Programming Lab
  • 44,859
  • Dec 25, 2014
12.

Write a C program to determine if the given string is a palindrome (or) not.

  • Computer Programming Lab
  • 12,269
  • Dec 25, 2014
13.

Write a C program that displays the position or index in the string S where the string T begins, or – 1 if S doesn’t contain T.

  • Computer Programming Lab
  • 22,574
  • Dec 25, 2014
14.

Write a C program to count the lines, words and characters in a given text.

  • Computer Programming Lab
  • 111,097
  • Dec 25, 2014
15.

Write a C program to generate Pascal’s triangle.

  • Computer Programming Lab
  • 14,639
  • Dec 25, 2014
16.

Write a C program to construct a pyramid of numbers.

  • Computer Programming Lab
  • 15,727
  • Dec 25, 2014
17.

Write a C program to read in two numbers, x and n, and then compute the sum of this geometric progression:
1+x+x2+x3+………….+xn
For example: if n is 3 and x is 5, then the program computes 1+5+25+125.
Print x, n, the sum
Perform error checking. For example, the formula does not make sense for negative exponents – if n is less than 0.
Have your program print an error message if n<0, then go back and read in the next pair of numbers of without computing the sum. Are any values of x also illegal? If so, test for them too.

  • Computer Programming Lab
  • 17,434
  • Dec 25, 2014
18.

2’s complement of a number is obtained by scanning it from right to left and complementing all the bits after the first appearance of a 1. Thus 2’s complement of 11100 is 00100. Write a C program to find the 2’s complement of a binary number.

  • Computer Programming Lab
  • 11,708
  • Dec 25, 2014
19.

Write a C program to convert a Roman numeral to its decimal equivalent.

  • Computer Programming Lab
  • 36,110
  • Dec 25, 2014
20.

Write a C program that uses functions to perform the following operations:

  1. Reading a complex number
  2. Writing a complex number
  3. Addition of two complex numbers
  4. Multiplication of two complex numbers

(Note: represent complex number using a structure.)

  • Computer Programming Lab
  • 24,664
  • Dec 25, 2014
21.

Write a C program which copies one file to another.
(Note: The file name and n are specified on the command line.)

  • Computer Programming Lab
  • 19,513
  • Oct 21, 2014
22.

Write a C program to reverse the first n characters in a file.
(Note: The file name and n are specified on the command line.)

  • Computer Programming Lab
  • 26,253
  • Oct 21, 2014
23.

Write a C program to display the contents of a file.

  • Computer Programming Lab
  • 25,501
  • Oct 21, 2014
24.

Write a C program to merge two files into a third file (i.e., the contents of the first file followed by those of the second are put in the third file).

  • Computer Programming Lab
  • 15,718
  • Oct 21, 2014
25.

Write a C program that uses non recursive function to search for a Key value in a given list of integers using Linear search.

  • Computer Programming Lab
  • 37,585
  • Oct 21, 2014
26.

Write a C program that uses non recursive function to search for a Key value in a given sorted list of integers using Binary search.

  • Computer Programming Lab
  • 45,608
  • Oct 21, 2014
27.

Write a C program that implements the Selection sort method to sort a given array of integers in ascending order.

  • Computer Programming Lab
  • 12,341
  • Oct 21, 2014
28.

Write a C program that implements the Bubble sort method to sort a given list of names in ascending order.

  • Computer Programming Lab
  • 20,550
  • Oct 21, 2014
29.

Write a C program that uses functions to perform the following operations:

  1. Create a singly linked list of integer elements.
  2. Traverse the above list and display the elements.
  • Computer Programming Lab
  • 23,110
  • Dec 12, 2021
32.

Write a C program to implement the linear regression algorithm.

  • Computer Programming Lab
  • 35,371
  • Oct 21, 2014
33.

Write a C program to implement the polynomial regression algorithm.

  • Computer Programming Lab
  • 11,641
  • Oct 21, 2014
34.

Write a C program to implement the Lagrange interpolation.

  • Computer Programming Lab
  • 41,919
  • Oct 21, 2014
35.

Write C program to implement the Newton- Gregory forward interpolation.

  • Computer Programming Lab
  • 18,693
  • Oct 21, 2014
36.

Write a C program to implement Trapezoidal method.

  • Computer Programming Lab
  • 22,180
  • Oct 21, 2014
37.

Write a C program to implement Simpson method.

  • Computer Programming Lab
  • 7,258
  • Nov 05, 2014