ExamVeda
Login
Home
61
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 0;
    while (i++ != 0) ;
    Console.WriteLine(i);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
62
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 0;
    while (i <= 50)
    {
        if (i % 10 == 0)
        continue;
        else
        break;
        i += 10;
        Console.WriteLine(i % 10);
   }
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
63
What is the correct syntax for do while loop?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
64
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1;
    while (i <= 1)
    {
        if ('A' < 'a')
        {
            Console.WriteLine("Hello...");
        }
        else
        {
           Console.WriteLine("Hi...");
        }
           i++;
    }
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
65
What will be the output of the following C# code?
static void Main(string[] args)
{
    int a = 5, b = 10;
    if (Convert.ToBoolean(Convert.ToInt32(++a)) || Convert.ToBoolean(Convert.ToInt32(++b)))
    {
        Console.WriteLine(a + "\n" + b);
    }
    else
    Console.WriteLine(" C# ");
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
66
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i, s = 0, a = 1, d;
    i = Convert.ToInt32(Console.ReadLine());
    do
    {
        d = i % (2 * 4);
        s = s + d * a;
    }while ((Convert.ToInt32(i = i / (2 * 4))) != 0 
     && (Convert.ToBoolean(Convert.ToInt32((a) = (a * 10)))));
    Console.WriteLine(s);
    Console.ReadLine();
}
enter i = 342.
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
67
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1, j = 5;
    do
    {
        Console.WriteLine(i = i++ * j);
    }while (i <= 10);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
68
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i = 1, j = 1;
    while (++i <= 10)
    {
        j++;
    }
    Console.WriteLine(i+ "  " +j);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
69
What will be the output of the following C# code?
static void Main(string[] args)
{
    int I, J = 0;
    for (I = 1; I < 10; ) ;
    {
        J = J + I;
        I += 2;
    }
    Console.WriteLine("Sum of first 10 even numbers is:"+J);
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
70
What will be the output of the following C# code?
static void Main(string[] args)
{
    int i;
    for (i = 0;  ; )
    {
        Console.WriteLine("hello");
    }
    Console.ReadLine();
}
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board