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

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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