0

How to convert ascii to string

Encryption and decryption of string to ascii using addition and subtraction key

23rd Mar 2020, 3:29 PM
Aparna
Aparna - avatar
1 ответ
+ 1
Aparna please tag the language in which you need. And also mention your try.. Ex: If string is "abcde", then str[0] points to 'a'. a ascii value is 97. You get this by casting to int. (int)str[0]. You can store result in a Integer variable.. (int)str[0]+1 =98 again if you cast this to char will result 'b'. (int)str[0]+1 This way you add and encrypt values. Reversing is description. So this is one way you can do. Hope this helps you...
23rd Mar 2020, 3:42 PM
Jayakrishna 🇮🇳