0
Why is the void data type used for the function if the output is a string?
5 Respuestas
+ 2
I think there might be some terminology confusion. Output is *not* return type. Output is what you write to console or file an return type is what a function returns to its caller.
0
it only holds data, which means it doesn't a specific return type, which also means that it can hold any data type.
0
The function itself won't output anything once it has run through. Void type functions don't return anything.
Within the function though you can output any type you want.
0
It holds particular data... but have no return type..
0
@Sabbir: Again, an answer that is misleading... What particular data does the function hold? Also, OP did not specifically say it's the return type... Pls try to improve on your answers.