Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion
89 / 187
Which method is called as shorthand method?
Answer:
To pass values as arguments to the constructor function when an object is declared.
By calling the constructor implicitly
Ex:
Implicit call:
Integer int1 (0,100);
This method is called as shorthand method, is used very often as it is shorter, looks better and is easy to implement.
Asked In ::
Amit Yadav
23 Feb, 2019 5:07 AM
To pass values as arguments to the constructor function when an object is declared.
By calling the constructor implicitly
Ex:
Implicit call:
Integer int1 (0,100);
This method is called as shorthand method, is used very often as it is shorter, looks better and is easy to implement.
By calling the constructor implicitly
Ex:
Implicit call:
Integer int1 (0,100);
This method is called as shorthand method, is used very often as it is shorter, looks better and is easy to implement.