Find letter 's position in Alphabet using Bit operation | C # implementation of the approach ; Function to calculate the position of characters ; Performing AND operation with number 31 ; Driver code
using System ; class GFG { public static int NUM = 31 ; static void positions ( string str , int n ) { for ( int i = 0 ; i < n ; i ++ ) { Console . Write ( ( str [ i ] & NUM ) + " ▁ " ) ; } } public static void Main ( ) { string str = " Geeks " ; int n = str . Length ; positions ( str , n ) ; } }