Showing segmentation fault

hi @aryaman.kumar26 this is the corrected code


Please note that in the question, lowercase letters have been used so use lowercase letters in the keypad array else you will not pass test cases

how do i print the sum?

@aryaman.kumar26 you can pass a reference variable and initialise it with 0, and increment its value in the base case.

no that i understood but when to do it is giving me problem

@aryaman.kumar26 Share the code I’ll look at it

@aryaman.kumar26 https://ide.codingblocks.com/s/271289

send it by reference by adding &var in the funcn arguments.

appreciate the help…

1 Like

@aryaman.kumar26 please mark the doubt as resolved if you havent already :smiley: