+ 3

what is the purpose of using out keyword? In what situations is it useful?

10th Jul 2016, 9:15 AM
Aastha Aneja
Aastha Aneja - avatar
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
11th Jul 2016, 4:29 PM
shubham sharma
0
m asking abt it n C# not C++.....thr is no Cout in C# @shubham sharma
11th Jul 2016, 4:32 PM
Aastha Aneja
Aastha Aneja - avatar
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.
23rd Aug 2016, 3:51 PM
Erwin Mesias
Erwin Mesias - avatar