Smart Keypad - 1

What’s the error in this code.
Also the given question is a bit difficult to understand as the question and the sample input cases are a bit different.

Hey @mananaroramail,
Please share your code as well.
See imagine the old nokia-samsung phones which had buttons. 1-abc, 2-def and so on.
Similarly in this question, you are given the string table[] = { " ", “.+@$”, “abc”, “def”, “ghi”, “jkl” , “mno”, “pqrs” , “tuv”, “wxyz” };

where string corresponding to 0 is " " and 1 is “.+@$” and 2 is “abc”.

Now if input is 12. Means you pressed buttons 1 and 2 what are the possible combinations you can make:

1 has .+@$
2 has abc

So all the possible combinations will be:
.a
.b
.c
+a
+b
+c
@a
@b
@c
$a
$b
$c
Note:We only need to print all the possible combinations arising if we press buttons given in the input string.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.