You are on page 1of 2

1) 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.
2) Write a C program to find the roots of a quadratic equation.
3) Write a C program which ta!es two integer operands and one operator from the user performs the operation and
then prints the result. "Consider the operators #$% & ' and use Switch Statement(
).Write C programs that use both recursi*e and non$recursi*e functions
+o find the ,C- "greatest common di*isor( of two gi*en integers.
5) Write a C program that uses functions to perform the following:
ii( .ultiplication of +wo .atrices
6) Write a C program to determine if the gi*en string is a palindrome or not
7) Write a C program to count the lines words and characters in a gi*en te/t.
8) 01s 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. +hus 01s complement of 11100 is 00100. Write a C program to find the 01s complement of a
binary number.
9) Write a C program to con*ert a 2oman numeral to its decimal equi*alent.
10. Write a C program that uses functions to perform the following operations:
i( 2eading a comple/ number
ii( Writing a comple/ number
iii( Addition of two comple/ numbers
i*( .ultiplication of two comple/ numbers
"3ote: represent comple/ number using a structure.(
11) 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(
10( Write a C program that uses non recursi*e function to search for a 4ey *alue in a gi*en list of integers using
5inear search.
16( Write a C program that uses non recursi*e function to search for a 4ey *alue in a gi*en sorted list of integers
using 7inary search.
1)( Write a C program that implements the 7ubble sort method to sort a gi*en list of names
in ascending order.
18.Write a C program that uses functions to perform the following operations:
i( Create a singly lin!ed list of integer elements.
ii( +ra*erse the abo*e list and display the elements.
16) Write a C program to generate all the prime numbers between 1 and n where n is a *alue supplied by the user.
19Write C programs that use both recursi*e and non$recursi*e functions
i( +o find the factorial of a gi*en integer.
1:.Write a C program to find the largest integer in a list of integers.
19.) Write a C program to re*erse the first n characters in a file.
"3ote: +he file name and n are specified on the command line.(
00( Write a C program that implements the Selection sort method to sort a gi*en array of integers
in ascending order.

You might also like