cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
URGENT: please suggest the answer with
URGENT: please suggest the answer with explanation
Sep 12, 2013 at 4:14pm UTC
himasagar7
(1)
what is the most appropriate option for the code snippet below
Class myint{
Public:
myint(int value):m_int(int value){}
myint &operator++()
{
++m_int;
return * this;
}
myint operator++(int)
{
myint tmp(*this);
++m_int;
return tmp;
}
Private :int m_int;
Q)For ++ operator overloaded in the class myint
1.Prefix implementation is more efficient than postfix
2.postfix implementation is more efficient than prefix
3. Both prefix and post fix are efficient
4. None of these
Topic archived. No new replies allowed.