• +91 9723535972
  • info@interviewmaterial.com

C Interview Questions and Answers

Question - What is conversion operator?

Answer - class can have a public method for specific data type conversions. for example: class Boo { double value; public: Boo(int i ) operator double() { return value; } }; Boo BooObject; double i = BooObject; // assigning object to variable i of type double. now conversion operator gets called to assign the value.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners