My Report

C# I/O Operation Test – 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Which among the following methods are used to write characters to a string?

2. Which of these methods are used to read single character from the console?

3. Which of these method used to read strings from the console?

4. 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();
 }

5. Name the method/methods used to read byte streams from the file?

6. Which of these classes are used by Byte streams for input and output operation?

7. Name the exception thrown by read() on failure.

8. Which of these method/methods are used to read block or array of bytes from the file?

9. Which method in Console enables to read individual inputs directly from the keyboard in a non line buffered manner?

10. What is the output returned by Console if ReadLine() stores I/O error?


 

Start practicing “1000 MCQs on C#”, and once you are ready, you can take tests on all topics by attempting our “C# Test Series”.

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.