info@avatto.com
+91-9920808017
31. To overload a prefix ++ for a Number class, an appropriate function header is
Number & Number:: operator ++ (Number & num)
Number & Number:: operator (int)++
Number & Number :: operator ++ (int)
This Number: : operator ++ (Number & num)
Your email address will not be published. Required fields are marked *
Report
Name
Email
Website
Save my name, email, and website in this browser for the next time I comment.
Comment
32. The « operator is used for output only when
it is used as a binary operator
it is used as a unary operator
cout is to the left
you write a function to overload it.
33. Object-oriented programmers primarily focus on
procedures to be performed
step-by-step statements needed to solve a problem
objects and the tasks that must be performed with those objects
physical orientation of objects within a program.
34. If « operator has been overloaded appropriately for the class Number, and a and b are members of the Numbers class, then which statement is legal?
count << a
count << a << b
Both (a) and (b)
None of these
35. Using an overloaded « operator for a class
is the only way to display values of data members of a class
works correctly only if all data members are private
allows output statements within a program that uses the class to become simpler
is possible only if the »operator is overloaded as well.
Login with Facebook
Login with Google
Forgot your password?
Lost your password? Please enter your email address. You will receive mail with link to set new password.
Back to login