Saturday 11 January 2014

PROGRAMS : (C & C++ Programming)


1.         Find the roots of a quadratic equation.

2.         Find whether given number is prime or not.

3.         Find the reverse of a given number.
            (Ex : 12345 becomes 54321).

4.         Find whether given number is palindrome or not.
            (Ex : 34543)


5.         Find the value of sinx, using series expansion.

6.         Sort the elements in a given array, using bubble sort.

7.         Sort the elements in a given array,  using insertion sort.

8.         Find the product of two matrices of sizes 3 x 4 and 4 x 3.

9.         Find the position of given element in the array, using binary search.

10.       Print the elements in the reverse order of the given elements in the array.

11.       Find the number of vowels in a given string.

12.       Find the number of letters in the given string.

13.       Find the number of words in the given string.

14.       Read all the records in a given sequential file.

15.       Find whether the given matrix is symmetric or not.

16.    Write a C++ program to implement flight class with data member as flight no.,
           source, destination and fare.  Write a copy constructor and a member
          function to display the flight information.

17.    Write a C++ program to implement a string object.  Include member
          functions to compare two strings and to concatenate two strings.

18.    Write a C++ program to implement a class to represent complex
           numbers.  Include member functions to add and multiply to complex
           numbers.  Overload assignment operator =

19.    Write a C++ program to implement time class that has separate data members
          for hours, minutes and seconds.  Overload + Operator to add two times
          (object) and ++ operator to increment the time by one second.

20.    Write a C++ program to implement a student class having roll no.,
          name, rank, addresses as data members.  Overload assignment operator =

21.    Write a C++ program to implement user defined string class.  Overload the
          constructor and a member function to concatenate two strings. 

22.    Write a C++ program implement Complex class with the member function Add,  
           Subtract and Multiply two complex Numbers.

23.    Write a C++ Program to implement a sphere class with appropriate members and 
           member function to find the surface area and the volume.
          (Surface = 4 π r2 and Volume = 4/ 3 π r3 )

24.    Write a C++ program to implements a string class.  Overload + Operator to 
           concatenate two strings.

25.    Write  a C + + program to implement matrix class.  Add member function to
           transpose the matrix.

26.    Write a C++ program to implement Bank-SB-Account Class with member functions to deposit, withdraw and show the balance.  assume appropriate data members.

27.    Write a C++ program to find the number of characters, word and lines in the given text
           as input.

28.    Write a C++ program to implement a telephone bill class with Name, Address, Tel. No., No. of calls as data members.  Compute the amount to be paid if the charges per call is Rs. 2/-.

29.    Write a C ++ program to implement a class for complex numbers with add and
           multiply as member functions.  Overload ++ operator to increment a complex 
           number.

30.    Write a C ++ program to implement a date class with member functions as next,
           previous which return next date and previous date objects.


No comments:

Post a Comment