Algorithm:
1.
Start
of program.
2.
Create
a class with character array as its data member
3.
Create
a function to display the sentence, by passing two objects as arguments
4.
Call
the function, display using constructor.
5.
End
of program
Program:
#include
#include
#include
class
make
{
public:
char join(char a[100],char b[100])
{
cout<
return 0;
}
};
void
main()
{
clrscr();
make m1;
char a[100];
char b[100];
strcpy(a,"Computer scientists
are ");
strcpy(b,"creators of
logic.");
m1.join(a,b);
getch();
}
No comments:
Post a Comment