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
write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory
What is overriding in oops?
assume the program must insert 4 elements from the key board and then do the following programs.sequential search(search one of the elements),using insertion sort(sort the element) and using selection sort(sort the element).
What is difference between oop and pop?
What is coupling in oops?
What is object and example?
Write a program to sort the number with different sorts in one program ??
what are the different types of qualifier in java?
What is difference between pop and oop?
Can static class have constructor?
What is a superclass in oop?
What is object in oop?
can we make game by using c
Why is polymorphism needed?
What is overloading in oops?