0
Why can't a default value be set in c?
6 Answers
+ 3
Default value for function parameters?
https://stackoverflow.com/questions/1472138/c-default-arguments
+ 3
The language designers did not consider this feature important as they were designing a low level language close to the machine
+ 3
@Otumian Empire, Have you read the link in my previous post? in short, there's no easy way for that, the parameter default value was introduced in C++, it was not available in C language (cmiiw).
+ 1
void func(int x, int y = 1)
reads an error
+ 1
yeah. I did..