- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
What will be the output of the C#.NET code snippet given below?int val;
for (val = -5; val <= 5; val++)
{
    switch (val)
    {
        case 0:
            Console.Write ("India"); 
            break;
    }
    
    if (val > 0)
        Console.Write ("B"); 
    else if (val < 0)
        Console.Write ("X");
}

1.XXXXXIndia

2.IndiaBBBBB

3.XXXXXIndiaBBBBB

4.BBBBBIndiaXXXXX

Posted Date:-2021-02-20 14:28:12


More MCQS Questions and answers

Search