Skip to main content

Miscellaneous In C Sharp — Part 1 MCQs with Explanations

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

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

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

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

What is the purpose of the "using" keyword in C#?

Question 2 of 40
★ FPSC ★ PPSC

What does the "break" keyword do in a switch statement?

Question 3 of 40
★ FPSC ★ PPSC

Which of the following is NOT a valid C# access modifier?

Question 4 of 40
★ FPSC ★ PPSC

What does the "this" keyword refer to in C#?

Question 5 of 40
★ FPSC ★ PPSC

What is the purpose of the "async" and "await" keywords in C#?

Question 6 of 40
★ FPSC ★ PPSC

What does the "params" keyword allow in C#?

Question 7 of 40
★ FPSC ★ PPSC

What does the "is" keyword do in C#?

Question 8 of 40
★ FPSC ★ PPSC

What does the "typeof" operator return in C#?

Question 9 of 40
★ FPSC ★ PPSC

What is the default value of an integer variable in C# if it is not explicitly initialized?

Question 10 of 40
★ FPSC ★ PPSC

What is the purpose of the "as" keyword in C#?

Question 11 of 40
★ FPSC ★ PPSC

Which of the following is NOT a valid C# loop construct?

Question 12 of 40
★ FPSC ★ PPSC

What does the "sealed" keyword do in C#?

Question 13 of 40
★ FPSC ★ PPSC

In C#, what does the "using" directive do?

Question 14 of 40
★ FPSC ★ PPSC

What does the "ref" keyword allow in C#?

Question 15 of 40
★ FPSC ★ PPSC

What does the "using" keyword do in the context of IDisposable objects in C#?

Question 16 of 40
★ FPSC ★ PPSC

What is the purpose of the "base" keyword in C#?

Question 17 of 40
★ FPSC ★ PPSC

Which of the following statements about properties in C# is true?

Question 18 of 40
★ FPSC ★ PPSC

Which of the following statements about constructors in C# is true?

Question 19 of 40
★ FPSC ★ PPSC

What does the "abstract" keyword indicate in C#?

Question 20 of 40
★ FPSC ★ PPSC

What is the purpose of the "delegate" keyword in C#?

Question 21 of 40
★ FPSC ★ PPSC

What is the default value of a boolean variable in C# if it is not explicitly initialized?

Question 22 of 40
★ FPSC ★ PPSC

What does the "out" keyword allow in C# method parameters?

Question 23 of 40
★ FPSC ★ PPSC

What does the "var" keyword do in C#?

Question 24 of 40
★ FPSC ★ PPSC

Which of the following is NOT a valid type conversion in C#?

Question 25 of 40
★ FPSC ★ PPSC

What does the "out" keyword do in C# method parameters?

Question 26 of 40
★ FPSC ★ PPSC

What does the "async" and "await" keywords do in C#?

Question 27 of 40
★ FPSC ★ PPSC

What does the "as" keyword do in C#?

Question 28 of 40
★ FPSC ★ PPSC

What is the purpose of the "typeof" operator in C#?

Question 29 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? public class A { public int x; public int y; public void display() { Console.WriteLine(x + " " + y); } } class Program { static void Main(string[] args) { A obj1 = new A(); A obj2 = new A(); obj1.x = 1; obj1.y = 2; obj2 = obj1; obj1.display(); obj2.display(); } }

Question 30 of 40
★ FPSC ★ PPSC

Which method is called when a thread is blocked from running temporarily?

Question 31 of 40
★ FPSC ★ PPSC

Accessibility modifiers defined in a class are?

Question 32 of 40
★ FPSC ★ PPSC

What is mutex?

Question 33 of 40
★ FPSC ★ PPSC

Which of these constructors is used to create an empty String object?

Question 34 of 40
★ FPSC ★ PPSC

Which among the following is a .NET namespace?

Question 35 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? class Program { static void Main(string[] args) { String c = "Hello i love Csharp"; Boolean var; var = c.StartsWith("hello"); Console.WriteLine(var); Console.ReadLine(); } }

Question 36 of 40
★ FPSC ★ PPSC

What will be the following C# code snippet specify? class MyClass { char chrs = 'A' ; public IEnumerator GetEnumerator() { for (int i = 20; i >=0; --i) if (i == 10) yield break; yield return (char)((chrs + i)); } } class Program { static void Main(string[] args) { MyClass mc = new MyClass(); foreach (char ch in mc) Console.Write(ch + " "); Console.WriteLine(); Console.ReadLine(); } }

Question 37 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? class Program { static void Main(string[] args) { String s1 = "one"; String s2 = string.Concat(s1 + " " + "two"); Console.WriteLine(s2); Console.ReadLine(); } }

Question 38 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? class UnsafeCode { unsafe static void Main() { int* ptrs = stackalloc int[3]; ptrs[0] = 1; ptrs[1] = 2; ptrs[2] = 3; for (int i = 2; i >= 0; --i) { ptrs[i] = ptrs[i]* 3; ptrs[i] = ptrs[i] + 4; Console.WriteLine(ptrs[i]); } Console.ReadLine(); } }

Question 39 of 40
★ FPSC ★ PPSC

Choose the base class for string() method.

Question 40 of 40
★ FPSC ★ PPSC

What does the yield return statement specify in the following C# code snippet? public System.Collections.IEnumerator GetEnumerator() { foreach (char ch in chrs) yield return ch; }

✓ 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 →