If I understand correctly I shout use void() only when a function has 0 parameters? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

If I understand correctly I shout use void() only when a function has 0 parameters?

Am I correct

11th Apr 2020, 1:22 PM
Radoslav Kostov
Radoslav Kostov - avatar
1 Answer
+ 1
Hi. You're wrong. In this case void is return value type, not parameters. Function with no parameters examples int f1() int f1(void)- no difference with first void f()
11th Apr 2020, 1:31 PM
Stephan
Stephan - avatar