0
How did this value come out : -2
int func(int a=2, int b=5){ return b-a; } int main (){ int k=7; cout<<func(k); }
1 ответ
+ 3
Since you have default values 2 and 5 in function params if you call function without params you get 3, BUT since you call function with k=7, param a become equal to 7 and param be still 5 so b-a = -2