Skip to main content

Delegates And Events In C Sharp — Part 2 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Delegates And Events In C Sharp — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
27
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
33 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
27

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/27 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 27
★ FPSC ★ PPSC

Choose the incorrect statement about delegates?

Question 2 of 27
★ FPSC ★ PPSC

Incorrect statements about delegates are?

Question 3 of 27
★ FPSC ★ PPSC

What does the following C# code block defines? class Gen<T> { T ob; }

Question 4 of 27
★ FPSC ★ PPSC

Which of the following is the correct way to call the subroutine function abc() of the given class in the following C# code? class csharp { void abc() { console.writeline("A:Just do it!"); } }

Question 5 of 27
★ FPSC ★ PPSC

Which among the following is the correct statement about delegate declaration? delegate void del(int i);

Question 6 of 27
★ FPSC ★ PPSC

Are generics in C# are same as the generics in java and templates in C++?

Question 7 of 27
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? public class Generic<T> { Stack<T> stk = new Stack<T>(); public void push(T obj) { stk.Push(obj); } public T pop() { T obj = stk.Pop(); return obj; } } class Program { static void Main(string[] args) { Generic<string> g = new Generic<string>(); g.push(30); Console.WriteLine(g.pop()); Console.ReadLine(); } }

Question 8 of 27
★ FPSC ★ PPSC

Which of the given statements are valid about generics in .NET Framework?

Question 9 of 27
★ FPSC ★ PPSC

Which of the following statements are valid in the following C# code snippet? public class Generic<T> { public T Field; public void testSub() { T i = Field + 1; } } class Program { static void Main(string[] args) { Genericlt;int>g = new Genericlt;int>(); g.testSub(); } }

Question 10 of 27
★ FPSC ★ PPSC

Choose the correct way to call subroutine fun() of the sample class? class a { public void x(int p, double k) { Console.WriteLine("k : csharp!"); } }

Question 11 of 27
★ FPSC ★ PPSC

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

Question 12 of 27
★ FPSC ★ PPSC

Which of these type parameters is used for generic methods to return and accept any type of object?

Question 13 of 27
★ FPSC ★ PPSC

In the following C# code, which of the following statements are perfectly valid? public class MyContainer<T> where T: IComparable { /* insert code here */ }

Question 14 of 27
★ FPSC ★ PPSC

Which of these is a correct way of defining generic method?

Question 15 of 27
★ FPSC ★ PPSC

In the following C# code, which statements are perfectly valid? public class Csharp { public void subject<S>(S arg) { Console.WriteLine(arg); } } class Program { static Void Main(string[] args) { Csharp c = new Csharp(); c.subject("hi"); c.subject(20); } }

Question 16 of 27
★ FPSC ★ PPSC

Choose the advantages of using generics?

Question 17 of 27
★ FPSC ★ PPSC

Choose the statements which makes delegate in C#.NET different from a normal class?

Question 18 of 27
★ FPSC ★ PPSC

Which of the following is an incorrect statement about delegate?

Question 19 of 27
★ FPSC ★ PPSC

Which of the following is the correct way to call the function abc() of the given class in the following C# code? class csharp { public int abc(int a) { Console.WriteLine("A:Just do it!"); return 0; } }

Question 20 of 27
★ FPSC ★ PPSC

Suppose a Generic class called as SortObjects is to be made capable of sorting objects of any type(integer, single, byte etc). Then, which of the following programming constructs is able to implement the comparison function?

Question 21 of 27
★ FPSC ★ PPSC

What will be the output of the following C# code? public class Generic<T> { public T Field; } class Program { static void Main(string[] args) { Generic<int> g2 = new Generic<int>(); Generic<int> g3 = new Generic<int>(); g2.Field = 8; g3.Field = 4; if (g2.Field % g3.Field == 0) { Console.WriteLine("A"); } else Console.WriteLine("Prints nothing:"); Console.ReadLine(); } }

Question 22 of 27
★ FPSC ★ PPSC

Which statement is valid for the following C# code snippet? public class Generic<T> { public T Field; } class Program { static void Main(string[] args) { Generic<String> g = new Generic<String>(); g.Field = "Hi"; Console.WriteLine(g.Field); } }

Question 23 of 27
★ FPSC ★ PPSC

Which of the following are the correct statements about delegates?

Question 24 of 27
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? { delegate string F(string str); class sample { public static string fun(string a) { return a.Replace(',''-'); } } class Program { static void Main(string[] args) { F str1 = new F(sample.fun); string str = str1("Test Your c#.NET skills"); Console.WriteLine(str); } } }

Question 25 of 27
★ FPSC ★ PPSC

Which among the given classes represents System.Collections.Generic namespace?

Question 26 of 27
★ FPSC ★ PPSC

Which among the given classes is present in System.Collection.Generic.namespace?

Question 27 of 27
★ FPSC ★ PPSC

Choose the incorrect statement among the following about the delegate?

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →