↓. Levi LawlietIt is to subtract the ASCII value of the character in the messagei (i is index) and to shift it, in order to keep message in alphabets only and so that it doesn’t go in the special characters. In other words take this example:if your key is 2 and your word is zebra the.first letter.
shifts by the ASCII value of z(ASCII value-122) to 124 and then when the outcome comes it will print something like this gdtc and the vertical bar is an absurd in this case, so by placing the character like this ‘z’ (which is actually 122 in computer terms) is, admin writes this algorithm (very clever) ch-‘z’+’a’ -1 in terms of computer what it does is 124-122+97-1=98 and 98 is the ASCII value of b and hence the shift still remains in the character format. I hope this makes it clearPS: the whole point of doing this was to keep things simple the other way it could have been written:ch-26 i think correct me if I am wrong people.
Sekian Artikel mengenai Pointer pada C, Lengkap Contoh Program dan Pembahasan, semoga artikel ini dapat bermanfaat bagi sobat baik untuk menambah ilmu, mengerjakan tugas, maupun untuk sekedar menambah wawasan tentang Pointer pada C dan Macam Operator Pointer baik Operator Dereference (&) maupun Operator Reference (.), apabila sobat menemui. Here you can learn C, C, Java, Python, Android Development, PHP, SQL. Get program for caesar cipher in C and C for encryption and decryption.