My Report

C# Programming Practice Test 7


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 of these method/methods are used to read block or array of bytes from the file?

2. 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:

3. Choose the correct statement about the WriteLine()?

4. What will be the output of the following C# code snippet?

 static void Main(string[] args)
 {
     Console.Write("c");
     Console.Write("sharp" );
     Console.ReadLine();
 }

5. To implement delegates, the necessary condition is?

6. Which of the following is used to perform all input & output operations in C#?

7. Select the method which returns the number of bytes from the array buffer:

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

9. What will be the output of the following C# code?

{
 delegate string f(string str);
 class sample
 {
     public static string fun(string a)
     {
         return a.Replace('k', 'o');
     }
 }
 class Program
 {
     static void Main(string[] args)
     {
         f str1 = new f(sample.fun);
         string str = str1("Test Ykur C#.NET Skills");
         Console.WriteLine(str);
         Console.ReadLine();
     }
 }
}

10. What does the following C# code block defines?

 class Gen<T> 
 {  
      T ob;    
 }

 

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.