πŸ“Š C#
Q. What will be the output of the following C# code?
Code:
public static void Main(string[] args)
  {
      int i = 546;
      object o = i;
      int n =(int) o;
      o = 70;
      System. Console. WriteLine("The value-type value = {0}", n);
      System. Console. WriteLine("The object-type value = {0}", o);
      Console. ReadLine();
  }
  • (A) 546, 0
  • (B) 546, 546
  • (C) 546, 70
  • (D) 70, 546
πŸ’¬ Discuss
βœ… Correct Answer: (C) 546, 70

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
226
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Babita
Publisher
πŸ“ˆ
88%
Success Rate