What will be the output of the following C# code? static void Main(string[] args) { ...
View QuestionWhich of the following is not infinite loop?
a) for( ;’2′; ) b) for( ;’0′; ) c) for( ;’1′; ) d) None of the above
View Question
What will be the output of the following C# code?
{
int i;
Console.WriteLine(“Hi”);
for (i = 1; i <= 10; i++)
Program.Main(args);
Console.ReadLine();
}
What will be the output of the following C# code? { ...
View Question
Which statement is correct among the mentioned statements?
i. The for loop works faster than a while loop
ii. for( ; ; )implements an infinite loop
Which statement is correct among the mentioned statements? i. The for loop works faster than a while loop
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int i, s = 0;
for (i = 1; i <= 10; s = s + i, i++);
{
Console.WriteLine(s);
}
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int i = 5;
for (; Convert.ToBoolean(Convert.ToInt32(i)); Console.WriteLine(i–)) ;
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) ...
View Question
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();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
int I, X;
for (I = 1; I <= (9 % 2 + I); I++)
{
X = (I * 3 + I * 2) / I;
Console.WriteLine(X);
}
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question
What will be the output of the following C# code?
static void Main(string[] args)
{
float f;
for (f = 0.1f; f <= 0.5; f += 1)
Console.WriteLine( ++f );
Console.ReadLine();
}
What will be the output of the following C# code? static void Main(string[] args) ...
View Question
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();
}
What will be the output of the following C# code? static void Main(string[] args) { ...
View Question