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 static modifier?

1157


How to use CMutex, CSemaphore in VC++ MFC

4756


Can a varargs method be overloaded?

1053


i got a backdoor offer in process global,Bangalore..Can i work with it?

2808


Why is object oriented programming so hard?

1047


What is abstract class in oop?

968


What is polymorphism in oop example?

978


What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }

2533


What is encapsulation with example?

1046


What is polymorphism what is it for and how is it used?

988


Can an interface inherit a class?

1030


write a programe to calculate the simple intrest and compund intrest using by function overlading

2153


what type of question are asked in thoughtworks pair programming round ?

2166


Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.

1197


Why is static class not inherited?

1066