51.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 2, k = 3;
    switch (i - k)
    {
    case -1:
        ++i;
        ++k;
        break;
    case 2:
        --i;
        ++k;
        break;
    default:
        i += 3;
        k += i;
        break;
    }
    Console.WriteLine(i + "\n" + k);
    Console.ReadLine();
}

52.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1, j;
    do
    {
        for (j = 1; ; j++)
        {
            if (j > 2)
                break;
            if (i == j)
                continue;
            Console.WriteLine(i + " " + j);
        }
        i++;
    } while (i < 3);
    Console.ReadLine();
}

53.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i;
    Console.WriteLine("enter value of i:");
    i = Convert.ToInt32(Console.ReadLine());
    if ( i % 2 == 0)
        goto even:
    else
    {
        Console.WriteLine("number is odd:");
        Console.ReadLine();
    }
    even:
    Console.WriteLine("number is even:");
    Console.ReadLine();
}
for i = 4.

54.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 2, j = 3, k = 4;
    switch (i + j - k)
    {
    case 0: case 2: case 4:
        ++i;
        k += j;
        break;
    case 1: case 3: case 5 :
        --i;
        k -= j;
        break;
    default:
        i += j;
        break;
    }
    Console.WriteLine(i + "\n" + j + "\n" + k);
    Console.ReadLine();
}

55.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1, j = 2, k = 3;
    do
    {
        Console.WriteLine((Convert.ToBoolean(Convert.ToInt32(i++))) 
        && (Convert.ToBoolean(Convert.ToInt32(++j))));
    }while (i <= 3);
    Console.ReadLine();
}

56.
What will be the output of the following C# code?
static void Main(string[] args)
{
    char ch = Convert.ToChar('a' | 'b' | 'c');
    switch (ch)
    {
    case 'A':
    case 'a':
        Console.WriteLine("case A|case a");
        break;
    case 'B':
    case 'b':
        Console.WriteLine("case B|case b");
        break;
    case 'C':
    case 'c':
    case 'D':
    case 'd':
        Console.WriteLine("case D|case d");
        break;
    }
    Console.ReadLine();
}

57.
What will be the output of the following C# code?
static void Main(string[] args)
{
    float s = 0.1f;
    while (s <= 0.5f)
    {
        ++s;
        Console.WriteLine(s);
    }
    Console.ReadLine();
}

58.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int x = 10;
    do
    {
        Console.WriteLine( x++);
    }
    while(Convert.ToBoolean(5) && Convert.ToBoolean(4) && Convert.ToBoolean(3) 
    && Convert.ToBoolean(2) && Convert.ToBoolean(1) && Convert.ToBoolean(0));    
    Console.ReadLine();
}

59.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i;
    Console.WriteLine("enter value of i:");
    i = Convert.ToInt32(Console.ReadLine());
    if (i < 7)
    {
        i++;
        continue;
    }
    Console.WriteLine("final value of i:" +i);
    Console.ReadLine();
}

60.
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 0;
    if (i == 0)
    {
        goto label;
    }
    label: Console.WriteLine("HI...");
    Console.ReadLine();
}