Buy Discounted Microsoft Exam Voucher
Rs. 5600
OFFER PRICE Rs. 4250/- | Contact: +91 9347458388
Azure Certification
NewBatches/Webinars
Packages
Gold Membership
Bestseller
Microsoft Azure Suite & Suite Plus
Azure DevOps Expert & Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Courses
MS.NET Courses (Includes Live Project)
Complete C#, OOPs and Windows Programing
ASP.NET MVC Online Training
ASP.NET WebForms
ASP.NET Core
WCF incl. Web Services and Remoting
WPF incl. MVVM and Prism
LINQ and Entity Framework
Live Project Training for Developing Enterprise Application
Live Project using Ntier Arch (.NET5 + EF Core + Angular)
Gold Membership
CareerStep IT Program
Client-side UI Technologies
Building Static Web Pages using HTML and CSS
JavaScript and HTML DOM
jQuery, AJAX and JSON
Building Interactive Web Pages using HTML5 and CSS3
BootStrap + Live Examples
AngularJS + Live Project
Angular + Typescript
ReactJS
KnockoutJS
Xamarin
SQL Server + MSBI
SQL Server 2017
Querying Data with Transact-SQL(70-761)
SQL Server Integration Service (SSIS)
SQL Server Reporting Service (SSRS)
SQL Service Analysis Service (SSAS)
Cloud Computing / Azure / AWS
AZ-900: Microsoft Azure Fundamentals
Azure Suite (AZ-104+AZ-204+AZ-305+ AZ-500)
AZ-104: Microsoft Azure Administrator
AZ-204: Developing Solutions for Microsoft Azure
AZ-305: Microsoft Azure Architect Technologies and Design
AZ-400: Microsoft Azure DevOps
DP-203: Data Engineering on Microsoft Azure
Amazon Web Services (AWS)
Testing Tools
Manual Testing
Selenium Testing with Java(Live Training)
SharePoint
SharePoint 2013
Microsoft Power Platform
Power Platform Suite
Data Analytics using PowerBI (DA-100)
MicroServices
Docker
Kubernetes
Microservices using .NET Core
Others
C and Data Structure
Core Java
OOPs and C++
Advance Java
Python Programming
Complete Azure Training
Pricing
Videos
Resources
AzureA2Z
Deccansoft
Blog
On-Job Tech Support
Wall of Fame
Testimonials
Contact Us
Login
Login or Register
×
Sign In
Register
Forgot Password?
How did you find us
WhatsApp
YouTube
LinkedIn
Facebook
Telegram
Twitter
Google
Referred by Friend
Refresh
Input symbols
By clicking Register, you accept to the
terms and conditions
and that you have read our
privacy policy.
Recover Password
×
Submit
Enquiry Now
Where did you come to know about us
WhatsApp
YouTube
LinkedIn
Facebook
LinkedIn Ad
Email
Twitter
Google
Referred
Other
Refresh
Input symbols
IO Streams
Interview Questions and Answer
1. The number of bytes a character takes is decided by the type of ________________
Options:
a. decoding
b. encoding
c. size
d. range
Reveal Answer
2. The unit of a data in a stream of Binary is ___________
Options:
a. not fixed
b. fixed
c. depends on stream
d. can't say
Reveal Answer
3. ________________ is inherited from stream.
Options:
a. File stream
b. Memory stream
c. Buffered stream
d. all the above
Reveal Answer
4. Stream and its inherited classes provide us data in the form of _____________
Options:
a. Integers
b. Characters
c. Bytes
d. Bits
Reveal Answer
5. _________________ is used to read from, write to, and manipulate file-related operations.
Options:
a. File stream
b. Text stream
c. Binary stream
d. Basic stream
Reveal Answer
6. ____________method is used to support random access to files in file stream objects
Options:
a. Seek
b. Push
c. Pop
d. Ask
e. Read
Reveal Answer
7. ______________ is a non-buffered stream whose encapsulated data is directly accessible in memory
Options:
a. File stream
b. text stream
c. binary stream
d. Memory stream
Reveal Answer
8. ________________ has no backing store and might be useful as a temporary buffer.
Options:
a. Memory stream
b. File stream
c. binary stream
d. text stream
Reveal Answer
9. A __________________ is a stream that adds buffering to another stream such as a network stream.
Options:
a. File stream
b. Binary stream
c. Buffered stream
d. Memory stream
Reveal Answer
10. A _________ can be composed around some types of streams in order to improve read and write performance
Options:
a. Memory stream
b. File stream
c. Buffered stream
d. binary stream
Reveal Answer
11. _______________ has buffering internally
Options:
a. Binary stream
b. Buffered stream
c. Memory stream
d. File stream
Reveal Answer
12. _________ does not need buffering
Options:
a. File stream
b. Buffered stream
c. binary stream
d. Memory stream
Reveal Answer
13. For reading a text file, the file stream object must be _____________ by stream reader object.
Options:
a. inherited
b. encapsulated
c. polymorphised
d. none
Reveal Answer
14. The write method is ____________ for all the basic data types.
Options:
a. overloaded
b. inherited
c. encapsulated
d. none
Reveal Answer
15. ____________________ is a process in which the objects state can be converted to a form in which it can be either persisted or transported
Options:
a. Serialization
b. Specialization
c. Formalization
d. none
Reveal Answer
16. In __________ serialization only the public instance members of a public class can be serialized.
Options:
a. Binary
b. XML
c. both a and b
d. none
Reveal Answer
17. What is a Stream?
Options:
a. It is the abstract base class of all streams
b. It is used to read/write data
c. None of the above
d. Both a and b
Reveal Answer
18. The different types of streams that are available in .net:
Options:
a. Reader Stream, DisplayStream
b. Basic Stream, Text Stream, Binary Stream
c. Display Stream, Writer Stream
d. None of the above
Reveal Answer
19. What are the classes available in System.IO namespace? i. FileStream ii. BufferedStream iii. StreamWriter iv. StringReader
Options:
a. i, ii
b. ii, iii
c. i, ii, iv
d. All the above
Reveal Answer
20. What does a Flush method in Stream class do?
Options:
a. Clears writer stream
b. Clears the underlying buffer
c. It is used to clear memory for variables
d. None of the above
Reveal Answer
21. What is the use of Stream.Write Method
Options:
a. Writes a sequence of bytes to current stream
b. Advances the position of the pointer to the number of bytes read
c. Has offset property to locate the position to start copying
d. All the above
Reveal Answer
22. What does a StreamWriter class implement
Options:
a. TextReader
b. TextWriter
c. StringWriter
d. StringReader
Reveal Answer
23. Using StringReader, the characters can be from:
Options:
a. Streams
b. Collections
c. Strings
d. None
Reveal Answer
24. What is the difference between Directory and DirectoryInfo?
Options:
a. Directory exposes static methods & DirectoryInfo exposes instance methods
b. DirectoryInfo exposes static methods & Directory exposes instance methods
c. Both are the same
d. None of the above
Reveal Answer
25. IOException is thrown when accessing information using: i. Files ii. Streams iii. Directories
Options:
a. i, ii
b. ii, iii
c. All the above
Reveal Answer
26. How to read text from a text file? i. ReadAllBytes ii. ReadAllLines iii. ReadAllText iv. OpenText
Options:
a. i, ii
b. i, iii
c. ii, iii
d. All the above
Reveal Answer
27. How to retrieve or set the current position in a stream?
Options:
a. Position
b. Seek
c. Read
d. Write
Reveal Answer
28. What is the function of Stream.CopyTo method?
Options:
a. Reads from current stream and writes to destination stream
b. Reads from destination stream and writes to current stream
c. This is used to copy from localvariables to another variable
d. None of the above
Reveal Answer
29. What are the standard I/O streams?
Options:
a. Console.In
b. Console.Out
c. Console.Error
d. All the above
Reveal Answer
30. What are types of serialization?
Options:
a. Binary Serialization
b. XML Serialization
c. String Serialization
d. A & B
e. A& C
Reveal Answer
31. Select the namespace on which the stream classes are defined?
Options:
a. System.IO
b. System.Input
c. System.Output
d. All of the mentioned
Reveal Answer
32. Choose the class on which all stream classes are defined?
Options:
a. System.IO.stream
b. Sytem.Input.stream
c. System.Output.stream
d. All of the mentioned
Reveal Answer
33. Choose the stream class method which is used to close the connection:
Options:
a. close()
b. static close()
c. void close()
d. none of the mentioned
Reveal Answer
34. The method used to write a single byte to an output stream?
Options:
a. void WriteByte(byte value)
b. int Write(byte[] buffer ,int offset ,int count)
c. write()
d. None of the mentioned
Reveal Answer
35. Select the method which writes the contents of the stream to the physical device.
Options:
a. fflush()
b. void fflush()
c. void Flush()
d. flush()
Reveal Answer
36. Select the method which returns the number of bytes from the array buffer:
Options:
a. void WriteByte(byte value)
b. int Write(byte[] buffer ,int offset ,int count)
c. write()
d. None of the mentioned
Reveal Answer
37. Name the method which returns integer as 1 when the end of file is encountered.
Options:
a. int read()
b. int ReadByte()
c. void readbyte()
d. None of the mentioned
Reveal Answer
38. Select the statements which define the stream.
Options:
a. A stream is an abstraction that produces or consumes information
b. A stream is linked to a physical device by the I/0 system
c. C# programs perform I/O through streams
d. All of the mentioned
Reveal Answer
39. Select the action of the method long seek()?
Options:
a. Attempts to readup to count bytes into buffer starting at buffer[offset]
b. Writes a single byte to an output stream
c. Sets the current position in the stream to the specified offset from specified origin and hence returns the new position
d. None of the mentioned
Reveal Answer
40. Which among the following attempts to read up to count bytes into buffer starting at buffer[offset], returning the number of bytes successfully read?
Options:
a. int ReadByte()
b. int Read(byte[] buffer ,int offset ,int count)
c. Void WriteByte(byte value)
d. None of the mentioned
Reveal Answer
41. Which property among the following represents the current position of the stream?
Options:
a. long Length
b. long Position
c. int Length
d. All of the mentioned
Reveal Answer
42. Choose the filemode method which is used to create a new output file with the condition that the file with same name if exists will destroy the old file:
Options:
a. FileMode.CreateNew
b. FileMode.Create
c. FileMode.OpenOrCreate
d. FileMode.Truncate
Reveal Answer
43. Which of these is a method used to clear all the data present in output buffers?
Options:
a. clear()
b. flush()
c. fflush()
d. close()
Reveal Answer
44. From which of these classes, the character based output stream class Stream Writer is derived?
Options:
a. TextWriter
b. TextReader
c. Character Stream
d. All of the mentioned
Reveal Answer
45. The advantages of using character stream based file handling are?
Options:
a. they operate directly on unicode characters
b. they operate directly on bits
c. If desired, they store unicode text
d. all of the mentioned
Reveal Answer
46. Which among the following classes are used to perform the character based file operations?
Options:
a. StreamReader
b. StreamWriter
c. InputStream
d. OutputStream
Reveal Answer
47. Choose the output for the given set of 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(); }
Options:
a. This will generate an exception
b. 0
c. Compile time error
d. This will generate an exception: Attempted to Divide by Zero
Reveal Answer
48. Choose the methods provided by Console.Out and Console.Error?
Options:
a. Write, WriteKey
b. WriteLine, WriteKey
c. Write, WriteLine, WriteKey
d. Write, WriteLine
Reveal Answer
49. In the given constructor declaration for character based file operation what does ‘path’ and ‘bool specifies? StreamWriter(string path, bool append)
Options:
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. None of the mentioned
Reveal Answer
50. Which of the class provides the operation of reading from and writing to the console in C#.NET?
Options:
a. System.Array
b. System.Output
c. System.ReadLine
d. System.Console
Reveal Answer
Packages
Gold Membership
Microsoft Azure Suite &Suite Plus
Azure DevOps Expert &Expert Plus
MS.NET Foundation For Beginners
MS.NET Full Stack Developer
UI / Web Development
SQL Server & MSBI Tools
Software Testing
Resources
Blog
Deccansoft
AzureA2Z
Wall of Fame
On-Job Tech Support
About
About BestDotNetTraining
About Trainer
Testimonials
FAQ
Other links
About Us
Contact Us
Leave us a feedback
Sitemap
Privacy Policy
Terms & Conditions
Proudly Powered by