91. Default Type of number without decimal is?
92. What will be the output of the following C# code?
static void Main(string[] args)
{
string Name = "He is playing in a ground.";
char[] characters = Name.ToCharArray();
StringBuilder sb = new StringBuilder();
for (int i = Name.Length - 1; i >= 0; --i)
{
sb.Append(characters[i]);
}
Console.Write(sb.ToString());
Console.ReadLine();
}
static void Main(string[] args)
{
string Name = "He is playing in a ground.";
char[] characters = Name.ToCharArray();
StringBuilder sb = new StringBuilder();
for (int i = Name.Length - 1; i >= 0; --i)
{
sb.Append(characters[i]);
}
Console.Write(sb.ToString());
Console.ReadLine();
}
93. What will be the output of the following C# code?
static void Main(string[] args)
{
String name = "Dr.Gupta";
Console.WriteLine("Good Morning" + name);
}
static void Main(string[] args)
{
String name = "Dr.Gupta";
Console.WriteLine("Good Morning" + name);
}
94. Disadvantages of Explicit Conversion are?
95. What will be the output of the following C# code conversion?
static void Main(string[] args)
{
char a = 'A';
string b = "a";
Console.WriteLine(Convert.ToInt32(a));
Console.WriteLine(Convert.ToInt32(Convert.ToChar(b)));
Console.ReadLine();
}
static void Main(string[] args)
{
char a = 'A';
string b = "a";
Console.WriteLine(Convert.ToInt32(a));
Console.WriteLine(Convert.ToInt32(Convert.ToChar(b)));
Console.ReadLine();
}
96. What will be the error in the following C# code?
Static Void Main(String[] args)
{
const int m = 100;
int n = 10;
const int k = n / 5 * 100 * n ;
Console.WriteLine(m * k);
Console.ReadLine();
}
Static Void Main(String[] args)
{
const int m = 100;
int n = 10;
const int k = n / 5 * 100 * n ;
Console.WriteLine(m * k);
Console.ReadLine();
}
97. The subset of 'int' data type is . . . . . . . .
98. Select a convenient declaration and initialization of a floating point number:
99. Why strings are of reference type in C#.NET?
100. What will be the output of the following C# code?
class Program
{
public static void Main(string[] args)
{
int i, j;
i = (j = 5) + 10;
Console. WriteLine(i);
Console. WriteLine(j);
Console. ReadLine();
}
}
class Program
{
public static void Main(string[] args)
{
int i, j;
i = (j = 5) + 10;
Console. WriteLine(i);
Console. WriteLine(j);
Console. ReadLine();
}
}
Read More Section(Basic Syntax and Data Types in C Sharp)
Each Section contains maximum 100 MCQs question on Basic Syntax and Data Types in C Sharp. To get more questions visit other sections.