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

What is difference between pop and oop?

1235


explain sub-type and sub class? atleast u have differ it into 4 points?

2360


What is the difference between inheritance and polymorphism?

1163


What is overloading and its types?

1248


How can you overcome the diamond problem in inheritance?

1228


What is the significance of classes in oop?

1232


What is polymorphism and example?

1098


What is oops concept with example?

1082


What are the 3 principles of oop?

1169


Who invented oop?

1193


Why is static class not inherited?

1152


Why do we use polymorphism in oops?

1105


What is object in oop?

1170


can inline function declare in private part of class?

4495


what are the realtime excercises in C++?

2897