71. Which of the following format specifiers is used to print hexadecimal values and return value of output as Octal equivalent in C#?
72. How many Bytes are stored by 'Long' Data type in C# .net?
73. Verbatim string literal is better used for?
74. What will be the output of the following C# code?
static void Main(string[] args)
{
float sum;
int i;
sum = 0.0F;
for (i = 1; i <= 10; i++)
{
sum = sum + 1 /(float)i;
}
Console.WriteLine("sum =" +sum);
Console.ReadLine();
}
static void Main(string[] args)
{
float sum;
int i;
sum = 0.0F;
for (i = 1; i <= 10; i++)
{
sum = sum + 1 /(float)i;
}
Console.WriteLine("sum =" +sum);
Console.ReadLine();
}
75. Types of 'Data Conversion' in C#?
76. What will be the output of the following C# code?
static void Main(string[] args)
{
int a = 5;
int b = 10;
int c;
Console.WriteLine(c = a-- - ++b);
Console.WriteLine(b);
Console.ReadLine();
}
static void Main(string[] args)
{
int a = 5;
int b = 10;
int c;
Console.WriteLine(c = a-- - ++b);
Console.WriteLine(b);
Console.ReadLine();
}
77. What will be the output of the following C# string? (Enter a String : BOMBAY).
static void Main(string[] args)
{
string Str, Revstr = " ";
int Length;
Console.Write("Enter A String : ");
Str = Console.ReadLine();
Length = Str.Length - 1;
while (Length >= 0)
{
Revstr = Revstr + Str[Length];
Length --;
}
Console.WriteLine("Reverse String Is {0}", Revstr);
Console.ReadLine();
}
static void Main(string[] args)
{
string Str, Revstr = " ";
int Length;
Console.Write("Enter A String : ");
Str = Console.ReadLine();
Length = Str.Length - 1;
while (Length >= 0)
{
Revstr = Revstr + Str[Length];
Length --;
}
Console.WriteLine("Reverse String Is {0}", Revstr);
Console.ReadLine();
}
78. The following C# codes are?
1. Myclass class;
Myclass class2 = null;
2. int i;
int j = 0;
1. Myclass class;
Myclass class2 = null;
2. int i;
int j = 0;
79. Valid Size of float data type is?
80. The Default value of Boolean Data Type is?
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.