0

how to display output as our name

6th Sep 2016, 4:45 PM
kumar
2 Respuestas
+ 2
{ string name; cout<<"enter ur name"<<endl; cin>>name; cout<<"Hello "<<name<<endl; }
6th Sep 2016, 5:04 PM
Suhail Pappu
Suhail Pappu - avatar
+ 1
class name { char *a; int size; public: name() { size=10; a=new int(size); } void get() { cout<<"enter name:"<<endl; cin>>name; } void display() { cout<<name; } }; int main() { name n; n.get(); n.display(); return 0; }
13th Sep 2016, 2:01 PM
Twinkle Baisane
Twinkle Baisane - avatar