41. What will be the output of the following C# code snippet?
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder("hello world");
sb.Insert(6, "good");
Console.WriteLine(sb);
Console.ReadLine();
}
static void Main(string[] args)
{
StringBuilder sb = new StringBuilder("hello world");
sb.Insert(6, "good");
Console.WriteLine(sb);
Console.ReadLine();
}
42. Choose the output returned when read() reads the character from the console?
43. Which of the given stream methods provide access to the output console by default in C#.NET?
44. What will be the output for following input from the console as a character?
static void Main(string[] args)
{
Console.WriteLine("what is your name?");
char s;
s = Convert.ToChar(Console.ReadLine());
Console.WriteLine("how are you: "+s);
Console.Read();
}
static void Main(string[] args)
{
Console.WriteLine("what is your name?");
char s;
s = Convert.ToChar(Console.ReadLine());
Console.WriteLine("how are you: "+s);
Console.Read();
}
45. Which of the following statement is correct?
46. Choose the object of TextReader class.
47. Which of the following is the correct statement about inspecting an attribute in C#.NET?
48. Choose the output returned when an error condition is generated while read() reads from the console.
49. Which among the following methods are used to write characters to a string?
50. The correct method to pass a parameter to an attribute is?
Read More Section(File Handling and Input Output in C Sharp)
Each Section contains maximum 100 MCQs question on File Handling and Input Output in C Sharp. To get more questions visit other sections.