what is cascading of input &output operators? give examples
Answers
Answered by
56
The multiple use of input or output operators (“>>”or”<<”) in one statement is called cascading of I/O operator. The statement using multiple output operators (“>>”) is said to be cascading output operator and the statement involving multiple use of input operators (“<<”) is said to be cascading input operator.
e.g
int x,y;
cin>>x>>y; // multiple extraction operator with cin
cout<<x<<y<<endl; //multiple insertion operator with cout
Answered by
9
When an object calls an operator function by passing an argument and the returned value of the operator function calls the next operator function in the same expression, it is called as cascading of operators. Below are the examples for illustration of Cascading Of Operations:)
Similar questions
Social Sciences,
7 months ago
Computer Science,
7 months ago
Social Sciences,
7 months ago
Physics,
1 year ago
Physics,
1 year ago