


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



the size of string from user & than Enter the string from the user.
Overload the following operator for the class Mystring:
“>>”: take the input of object of Mystring, i.e. 1st^ string size & than string
Main() { Mystring obj; Cin>>obj; }
Main() {
Eneter the Size of String: 25 Enter String: Mid-Exam was so easy
Your output is: The Size of String Allocated: 25 The Original Size of String: 20 String: Mid-Exam was so easy
Mystring obj; Cout<<obj; }
Example: 1st^ object have“Table” & 2nd^ object have “chair” when obj1+obj Than output on screen should be: Table & Chair
Example: 1st^ object have “Table” & 2nd object have “chair” when obj1=obj Than output on screen should be: chair
Example: 1st^ object have “FAMES” & 2nd object have “NAMED” when obj1-obj Than output on screen should be: FNSD
Example: 1st^ object have “table” than “!obj1” output will be: ELBAT
Example: 1st^ object have “FAMES” & 2nd^ object have “NAMED” when obj1!=obj Than output on screen should be: objects are not equal
Note: Ø Make all the necessary functions including constructor & destructor. File should be submitted. i.e., “rollno_A5”.delete Debug folder. Only zip Ø All code files should contain Roll Number, Name, Assignment Number and Date, e.g.:// Syed Mohammad Irteza // 07-0555// assignment Ø // 10/06/2009Your code should have appropriate comments. Ø Ø Use meaningful identifier names for variables and functions.Properly indent your code, to make it readable.