Home / CSE MCQs / C#.Net MCQs :: Discussion

Discussion :: C#.Net MCQs

  1. What will be output of the following conversion ?

    static void Main(string[] args)
     {
         char a = 'A';
         string b = "a";
         Console.WriteLine(Convert.ToInt32(a));
         Console.WriteLine(Convert.ToInt32(Convert.Tochar(b)));
         Console.ReadLine();
     }
  2. A.
    1, 97
    B.
    65, 97
    C.
    65, 97
    D.
    97, 1

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    ASCII value of character 'a' is 65 and ASCII value of string "a is 97. Output: 65,97


Be The First To Comment