Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What will be the output of the following conversion?

           static void Main(string[] args)

 {

     char a = 'A';

     string b = "a";

     Console.WriteLine(Convert.ToInt(a));

     Console.WriteLine(Convert.ToInt(Convert.Tochar(b)));

     Console.ReadLine();

 

 }

 

a)1,b),c),d),1

user-image
Question added by Mohannad Bakbouk , Full Stack Web Developer , Almohtaseb
Date Posted: 2016/10/19
Chetan Bhadra
by Chetan Bhadra , Software Engineer , Verve System Pvt. Ltd.

…See more

Answer is: A: 97 & B: 98

Because we converting character to integer so it give us ascii value

More Questions Like This