51. Which of these operators can be used to concatenate two or more String objects?
52. What does the yield return statement specify in the following C# code snippet?
public System.Collections.IEnumerator GetEnumerator()
{
foreach (char ch in chrs)
yield return ch;
}
public System.Collections.IEnumerator GetEnumerator()
{
foreach (char ch in chrs)
yield return ch;
}
53. What will be the output of the following C# code snippet?
class Program
{
static void Main(string[] args)
{
int y = (int)Math.Max(4,2);
int z = (int)Math.Pow(y, 2);
Console.WriteLine(z);
Console.ReadLine();
}
}
class Program
{
static void Main(string[] args)
{
int y = (int)Math.Max(4,2);
int z = (int)Math.Pow(y, 2);
Console.WriteLine(z);
Console.ReadLine();
}
}
54. In which of the following collections is the I/O based on a key?
55. What will be the output of the following C# code snippet?
class UnsafeCode
{
unsafe static void Main()
{
int m = 10;
int *mptr = &m;
int **ptr = &mptr;
int n = 20;
int *nptr = &n;
int **prt = &nptr;
m = **prt + *nptr;
n = *mptr* **prt;
Console.WriteLine(n + " " + m);
Console.ReadLine();
}
}
class UnsafeCode
{
unsafe static void Main()
{
int m = 10;
int *mptr = &m;
int **ptr = &mptr;
int n = 20;
int *nptr = &n;
int **prt = &nptr;
m = **prt + *nptr;
n = *mptr* **prt;
Console.WriteLine(n + " " + m);
Console.ReadLine();
}
}
56. What will be the output of the following C# code snippet?
class Program
{
static void Main(string[] args)
{
double x = 3.14;
int y = (int) Math.Abs(x);
Console.WriteLine(y);
}
}
class Program
{
static void Main(string[] args)
{
double x = 3.14;
int y = (int) Math.Abs(x);
Console.WriteLine(y);
}
}
57. Which among the following is not a preprocessor directive?
58. Which among the following is the correct way to find out the number of elements currently present in an ArrayListCollection called arr?
59. Which of these method returns a smallest whole number greater than or equal to variable X?
60. Which statement is correct in the following C#.NET code snippet?
Stack st = new Stack();
st.Push("Csharp");
st.Push(7.3);
st.Push(8);
st.Push('b');
st.Push(true);
Stack st = new Stack();
st.Push("Csharp");
st.Push(7.3);
st.Push(8);
st.Push('b');
st.Push(true);
Read More Section(Miscellaneous in C Sharp)
Each Section contains maximum 100 MCQs question on Miscellaneous in C Sharp. To get more questions visit other sections.