Sourabh Somani
What will be result of the following C# program
  1. using System;
  2. public class X
  3. {
  4. public static void Main()
  5. {
  6. int i=0;
  7. i=i++ + i++;
  8. i++;
  9. ++i;
  10. Console.WriteLine(i);
  11. }
  12. }

Also explain how you solved?

By Sourabh Somani in .NET on Jun 29 2019
  • Harshit Pandey
    Apr, 2024 5

    1. using System;
    2. public class X
    3. {
    4. public static void Main()
    5. {
    6. int i=0;
    7. i=i++ + i++;
    8. i++;
    9. ++i;
    10. Console.WriteLine(i);
    11. }
    12. }

    • 0
  • Pushpendra Kumar Shukla
    Oct, 2023 31

    3

    • 0