Question: B 1 Given test _ Str . cpp write the corresponding header file and implementation file ( Str . h , Str . cpp )

B1 Given test_Str.cpp write the corresponding header file and implementation file (Str.h, Str.cpp).
// test_Str.cpp
#include
#include "Str.h"
using namespace std;
int main()
{
Str s1;
char courseName[]="cpp";
Str s2(courseName);
Str s3(s2);
s2.print(); //cpp
s3.print(); //cpp
s1= s2; s1.print();
//cpp
++s1; s1.print();
//dqq
s1[0]='P'; s1.print(); //Pqq
return 0;
}
Hint: use the followi

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!