Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

Confused on why a void funcion doesnt return a value?

0 votes
asked Feb 28 by dany0331 (120 points)

1 Answer

+1 vote
answered Mar 6 by Peter Minarik (86,240 points)

If you want to return a value, you specify what kind of value you'd like to return.

If you do not want to return anything to the caller, just do something for the caller, then you indicate this by having a void return value.

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...