The general syntax to overload the stream extraction operator >> for a class is ____.
A) istream& operator>>(istream&, className&) ;
B) const istream& operator>>(istream&, className&) ;
C) friend operator>>(istream&, className&) ;
D) friend istream& operator>>(istream&, className&) ;
Correct Answer:
Verified
Q11: Operators can be overloaded either for objects
Q12: When an object invokes a member function,
Q13: The general form of the functions to
Q14: The name of the function to overload
Q15: A friend function does not have access
Q17: Operator functions typically return void.
Q18: Every object of a class maintains a
Q19: The associativity of the operator = is
Q20: In C++, operator is a reserved word.
Q21: With the exception of the _ operator
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents