0

What is a difference between void and int fucntion on c++

What is a difference between void and int function in code, can me get example !

16th Sep 2021, 7:44 PM
Abdullah Asaad
Abdullah Asaad - avatar
4 Réponses
+ 3
A void function doesn't return any value. An int function, returns an integer value unlike void. Also, float ones return float value, char one return char... etc. Happy coding!
16th Sep 2021, 7:50 PM
mesarthim
mesarthim - avatar
+ 1
mesarthim Thank you so much
16th Sep 2021, 7:52 PM
Abdullah Asaad
Abdullah Asaad - avatar
0
The main difference between these two function void and int function is that both return type is a quite different means return type for void() is Nothing and return type for int() is an integer value
17th Sep 2021, 1:35 AM
Abhishek Kumar
Abhishek Kumar - avatar
0
Thank you for Answer.
21st Sep 2023, 2:11 PM
Aung Kyaw Thu
Aung Kyaw Thu - avatar