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...

Conversion from a basic type to a class type may be
achieved using______________

Answer Posted / mohit swami

"constructor"

for example:

class time
{
int hrs;
public:
time(int t) //constructor
{
hrs=t/60;
}
};
void main()
{
time T1; // object T1 is created
int duration=85;
T1=duration; //int to class type
}

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write string class as your own class in java without using any built-in function

2507


Can we have inheritance without polymorphism?

1032


any one please tell me the purpose of operator overloading

2401


What is an interface in oop?

1052


i=20;k=0; for(j=1;k-i;k+=j<10?4:3) { cout<

1863


What are the components of marker interface?

1067


Can we define a class within the interface?

1050


What is the benefit of oop?

1060


What is stream in oop?

1304


What are the data types in oop?

1109


What are functions in oop?

1062


What is abstraction oop?

1103


Why do we use polymorphism?

1091


Can you inherit a private class?

1105


What is polymorphism in oops with example?

1062