Program does not go into the switch statements at all !

PaulS:
There aren't any. The only thing to be careful of is making sure that all if statements can be reached. Since your first one deals with all characters that are not a comma, and the second one deals with all (remaining) characters that are commas, there is no way for the third if statement to ever be reached. It seems like you want to move the third statement into the else if block that deals with the commas.

Sir, what exactly are the reason why the third arm of my if statement can never be reached? Is there an alternatives to
if/else-if/else-if statement if i want to keep the structure of the code as it is while replacing my if/else-if statement only?