1. add(5, 8, 10). Here a = 5, b = 8 and c = 10.
Then It prints 23(5 + 8 + 10)
2. add(5, 8). Here a = 5, b = 8 and no value for c then c will take the default value 5.
Hence it prints 18(5 + 8 + 5(default value for c)).
3. add(5). Here a = 5 and no values for b and c, then b and c will take the default values 2 and 5 respectively.
Hence it prints 12(5 + 2 + 5(default values for b and c)).