Saved Bookmarks
| 1. |
Explain the cascading of input and output with suitable example. |
|
Answer» The cascading is a way to extract/insert multiple values from/into more than one variable using one cin/cout statement. The multiple use of << or >> in a one statement is known of cascading. Cascading of output operator (>>): cout<< “ Hello “ << “ ISC cout<< “Value of B=” << b; Cascading of input operator (>>): int n1, n2, n3; cin >> n1 >> n2 >> n3 ; cin >> n1 >> n2 ; |
|