Why j value is 97 ? | Sololearn: Learn to code for FREE!

0

Why j value is 97 ?

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

c#

9/7/2017 11:09:16 AM

santosh kumar

2 Answers

New Answer

+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.

+1

it is asci code. a is placed in array index 97 of asci table.