Object Oriented programing
#include
class string
{
char str[20];
public:
string();
void operator+(string &);
void operator>>(istream &);
void operator<<(ostream &);
};
string::string()
{
}
void string::operator + (string &s)
{
cout << strcat (str,s.str);
}
void string::operator>>(istream &din)
{
din>>str;
}
void string::operator<<(ostream &dout)
{
dout<
}
void main()
{
string s1,s2;
cout <<"Please enter a string"<
cout <<"Please enter second string"<
s1+s2;
}
Now for some Ruby work
#!/usr/bin/ruby
a='harshad'
b='joshi'
c=a+b
print"c"
Job over. Isent Ruby more cool??
Why do Indian engineering institutes and colleges prefer more of C++, when many good options are available?