Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


//what is wrong with the programme??
#include<iostream.h>
template <class first>
class dd
{
first i;
public:
void set();
void print();
};
void dd< first>:: set()
{
cin>>i;
}
void dd< first>::print()
{
cout<<"\n"<<i;
}
void main()
{
dd <char>g;
g.set();
g.print();
}



//what is wrong with the programme?? #include<iostream.h> template <class first> clas..

Answer / prakash

template<class first> void dd<first>::set()
{
cin>>i;
}

template<class first> void dd<first>::print()
{
cout<<"\n"<<i;
}

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More OOPS Interview Questions

what is multithreading in c++ , what is difference between multithreading and singlethreading.

4 Answers  


what do you mean by static member variable?

2 Answers  


what is the need of abstraction? what is abstraction?what is the abstraction for stack?

8 Answers   CTS, Verizon,


What is class and object with example?

0 Answers  


What is encapsulation?

17 Answers   TCS,


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

0 Answers  


Which keyword is written to use a variable declared in one class in the other class?

5 Answers   TCS,


What is overloading and its types?

0 Answers  


why function overloading is not called as pure polymorphism?

2 Answers  


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

0 Answers  


What are the benefits of oop?

0 Answers  


Example for 4 pillar of oops like, Inheritance,Poly,Abstraction,Encabsulation ?

3 Answers  


Categories