1. Write a Cpp program that contains a function to exchange values of two arguments( swap) by using pointers and reference parameters.
  2. Write a CPP program to find the givenstring is palindrome or not. Declare private member function to find palindrome of the given string and access it using public member function.
  3. Write a CPP program to find transpose of2D matrix and allocate memory dynamically to the matrix using dynamic memoryallocation. Initialize and display contents of the matrix and deallocatememory.
  4. Write a CPP program to add twopolynomials of any degree using object as function arguments. Hint: create twoobjects each represent one polynomial equation.
  5. Write a CPP program to add correspondingelements of two 2D matrices using friend function. Create two classes eachcapable of storing one 2D matrix. Declare the matrix under private accessspecifier and access them outside the class.
  6. Write a program to find total and averagemarks of each student in class. Create a student class with student number,name, 6 subject marks as its members and initializes the details. Use friendclass that access the details of student and calculates total, average marksand prints the result.
  7. Write a program to add two matrices ofsame copy. Create two objects of the class and each of which refers one 2Dmatrix. Use constructor to allocate memory dynamically and use copy constructorto allocate memory when one array object is used to initialize another.
  8. Write a Program to Generate FibonacciSeries by using Constructor to Initialize the Data Members.
  9. Write a program for finding area of different geometric shapes (circle, Rectangle, cube). Use function overloading with type, order, sequence of arguments to find the area of shapes.
  10. Write a program which prompts the user toenter a string and returns the length of the longest sequence of identicalconsecutive characters within the string using pointers to data members andmember function. For example, in the string "aaaAAAAAjjB", thelongest sequence of identical consecutive characters is "AAAAA".
  11. Write a program to calculate gross andnet pay of employee from basic salary. Create employee class which consists ofemployee name, emp_id, and basic salary as its data members. Use parameterizedconstructor in the derived class to initialize data members of the base classand calculate gross and net pay of the employee in the derived class.
  12. Write a program to calculate bonus of theemployees. The class master derives the information from both admin and accountclasses which intern derives information from class person. Create base and allderived classes having same member functions called getdata, display data andbonus. Create a base class pointer that capable of accessing data of any classand calculates bonus of the specified employee. (Hint: Use virtual functions)
  13. Write a program to add two matrices ofmxn size using binary operator overloading.
  14. Write a program to find transpose of agiven matrix of mxn size using unary operator overloading.
  15. Write a program to concatenate one string to another using binary operator overloading.
  16. Write a program that uses functions to perform the following operations:
    1. To copy contents of one file into another file.
    2. To replace a word with other word in a given file?
    3. To count the no of occurrences of a word in a given file
  17. Write a program to sort a given set of elements using function template.
  18. Write a program to search a key element in a given set of elements using class template.
  19. Write a program to find average marks ofthe subjects of a student. Throw multiple exceptions and define multiple catch statements to handle division by zero as well as array index out of bounds exceptions.
  20. Write a program to find factorial of agiven number. Throw multiple exceptions and define multiple catch statements tohandle negative number andout of memory exception. Negative number exception thrown if given number is negative value and out of memory exception is thrown if the given number is greater than 20.

Posted by Unknown On 01:27 1 comment

1 comment:

  1. Very informative and impressive post you have written, this is quite interesting and i have went through it completely, an upgraded information is shared, keep sharing such valuable information.
    get more: Object Oriented Programming

    ReplyDelete

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

Blog Archive

Contact Us


Name

E-mail *

Message *