using System;using System.ComponentModel;using System.IO; cl…

using System;using System.ComponentModel;using System.IO; class FileStreamReadExample{    static void Main()    {        // Opens or creates if it doesn’t exist,        // with read/write access        using (FileStream fs = new FileStream(“test.bin”,            FileMode.OpenOrCreate, FileAccess.ReadWrite))        {            byte buffer = new byte;            int bytesRead = fs.Read(buffer, 0, buffer.Length);            Console.WriteLine($”Read {bytesRead} bytes.”);        }    }}

What will the following program write to the console? using…

What will the following program write to the console? using System;using System.Threading; class Program{    static void Main()    {        Thread t = new Thread(new ThreadStart(Worker));               Console.WriteLine(“Main thread does some work…”);        t.Start();        t.Join();        Console.WriteLine(“Main thread ends.”);    }     static void Worker()    {        Console.WriteLine(“Worker thread started…”);        Thread.Sleep(500);        Console.WriteLine(“Worker thread finished.”);    }}