+ 3
what is the purpose of using out keyword? In what situations is it useful?
3 Answers
0
If you're asking about "out" in cout , well it basically instructs the complier to print that's why out . cout is used because we use iostream header file so that"s why
0
m asking abt it n C# not C++.....thr is no Cout in C# @shubham sharma
0
@Aastha,
in c#,
by using out keyword,
whatever happens with the value of the parameter you pass, will also happen to the value of the variable outside the method.
so if you used out keyword in a parameter, if you assign a new value to that parameter, the value of the variable which is represented by that variable will also be changed.