0

Why j value is 97 ?

Char c='a'; int j=c; Console.WriteLine (j);

7th Sep 2017, 11:09 AM
santosh kumar
santosh kumar - avatar
2 ответов
+ 3
Characters are, like everything else on a computer, stored and manipulated in binary. "a" in binary is 1100001. When you store it in an integer, it's converted to it's decimal equivalent, 97.
7th Sep 2017, 11:18 AM
Sean Douglas
Sean Douglas - avatar
+ 1
it is asci code. a is placed in array index 97 of asci table.
1st May 2018, 10:24 AM
Paweł Sidorkiewicz
Paweł Sidorkiewicz - avatar