Which method in Console enables to read individual inputs directly from the keyboard in a non line buffered manner?
A. Read()
B. ReadKey()
C. ReadLine()
D. All of the mentioned
Select an option to see the answer and solution.
Select the objects of the class TextWriter which is/are not used to perform the write operations to the console?
A. Write()
B. WriteLine()
C. WriteError()
D. All of the mentioned
Select an option to see the answer and solution.
Choose the methods provided by Console.Out and Console.Error?
A. Write
B. WriteLine
C. WriteKey
D. Write & WriteLine
Select an option to see the answer and solution.
What will be the output of the following C# code snippet?
static void Main(string[] args)
{
string h = "i lovelife";
string h1 = new string(h.Reverse().ToArray());
Console.WriteLine(h1);
Console.ReadLine();
}A. efil evoli
B. lifelove i
C. efilevol i
D. efil evol i
Select an option to see the answer and solution.
From which of these classes, the character based output stream class Stream Writer is derived?
A. TextWriter
B. TextReader
C. Character Stream
D. All of the mentioned
Select an option to see the answer and solution.
Which among the following is used for storage of memory aspects?
A. BufferedStream
B. FileStream
C. MemoryStream
D. None of the mentioned
Select an option to see the answer and solution.
Select the correct methodS provided by Console.In?
A. Read(), ReadLine()
B. ReadKey(), ReadLine()
C. Read(), ReadLine(), ReadKey()
D. None of the above
Select an option to see the answer and solution.
Which of the given stream methods provide access to the input console in C#.NET?
A. Console.Out
B. Console.Error
C. Console.In
D. All of the mentioned
Select an option to see the answer and solution.
Select the namespace/namespaces which consists of methods like Length(), Indexer(), Append() for manipulating the strings.
A. System.Class
B. System.Array
C. System.Text
D. None of the mentioned
Select an option to see the answer and solution.
The number of input methods defined by the stream method Console.In in C#.NET is?
Select an option to see the answer and solution.
Choose the object/objects defined by the Textwriter class.
A. Console.In
B. Console
C. Console.Error
D. None of the mentioned
Select an option to see the answer and solution.
Which of the following is a type of stream in C#?
A. Integer stream
B. Character stream
C. Float stream
D. Long stream
Select an option to see the answer and solution.
The method used to write a single byte to an output stream?
A. void WriteByte(byte value)
B. int Write(byte[] buffer ,int offset ,int count)
C. write()
D. none of the mentioned
Select an option to see the answer and solution.
Which of the following cannot further inspect the attribute that is once applied?
A. Linker
B. ASP.NET Runtime
C. Language compilers
D. CLR
Select an option to see the answer and solution.
Select the correct statement about Attributes used in C#.NET?
A. The CLR can change the behaviour of the code depending on attributes applied to it
B. If a bugFixAttribute is to receive three parameters, then the BugFixAttribute class should implement a zero argument constructor
C. To create a custom attribute we need to create a custom attribute structure and derive it from System.Attribute
D. None of the mentioned
Select an option to see the answer and solution.
In the given constructor declaration for character based file operation what does 'path' and 'bool specifies?
StreamWriter(string path, bool append)A. the name of the file to open
B. specifies the full path of file
C. if append is true, the file is appended to the end of the existing file
D. all of the mentioned
Select an option to see the answer and solution.
Choose the stream class method which is used to close the connection?
A. close()
B. static close()
C. void close()
D. none of the mentioned
Select an option to see the answer and solution.
What will be the output of the following C# code snippet?
static void Main(string[] args)
{
String a ="i love iostream";
Console.WriteLine(a.IndexOf('i') + " " + a.IndexOf('e') + " " + a.LastIndexOf('i') + " " + a.LastIndexOf('e'));
Console.ReadLine();
}A. 0 6 7 8
B. 0 5 7 9
C. 5 9 0 7
D. 0 5 7 12
Select an option to see the answer and solution.
What will be the output of the following C# code?
static void Main(string[] args)
{
int a = 10, b = 0;
int result;
Console.Out.WriteLine("This will generate an exception.");
try
{
result = a / b; // generate an exception
}
catch (DivideByZeroException exc)
{
Console.Error.WriteLine(exc.Message);
}
Console.ReadLine();
}A. This will generate an exception
B. 0
C. Compile time error
D. This will generate an exception
Attempted to Divide by Zero
Select an option to see the answer and solution.
Which of these classes is used to read and write bytes in a file?
A. FileReader
B. FileWriter
C. FileInputStream
D. InputStreamReader
Select an option to see the answer and solution.