+ 5
Please help me out in this code.
Why am I getting a output even after writing "int" insted of "void"? https://code.sololearn.com/c2b0amuyLGPa/?ref=app
4 odpowiedzi
+ 4
Pratik Patil Void functions are created and used just like value-returning functions except they do not return a value after the function executes. Same are the int functions . You can use as many cout you want. That's why it is getting output. It is only return type not cout type. There nothing like cout type.🙄
+ 4
because your function's output is not a void, it is an int!
+ 3
This is because it is only the return type if you will try to return a value it will not return it with void. Because void doesn't return anything. You using cout not return.
+ 3
I am getting output even after writting void