i am having problem in making the final enciphering equation. actually i am confused with this ASCII part. not asking for code . just a helpful understanding of this ASCII part.
You can greatly simplify the problem by remembering that a "char" is just an 8-bit int. This means math works as expected.
'A' - 'A' = 0; 'B' - 'A' = 1;
This means you don't even have to worry about what each letter is you can simply subtract either 'A' if its upprcase (isupper(char)) or 'a' if its not (!isupper(char)) that will give you the distance from 'a' or 'A' and you can perform math on that. Add your shift value, modulo (% operator) it and then add 'A' or 'a' back to the value.
1 + 'A' = 'B'; 2 + 'a' = 'c';
when you remember this fact working with any kind of chars becomes much easier.