+ 2
Can we assign default value to first parameter
2 Answers
+ 2
yes
0
You assign a default value in the function header, this is how it looks
void example(int a = 1)
If you have more than one parameter, then the default value needs to be the last parameter