Functions And Methods In C Sharp — Part 2 MCQs with Explanations
Practice high-yield Programming & Software Development MCQs on Functions And Methods In C Sharp — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.
Questions
7
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
9 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
7
Verified Practice Questions
Interactive test mode with detailed academic worked solutions
Live Progress | 0/7 answered
✓ 0 correct
✗ 0 wrong
0% score
🎉 Set complete! All 7 questions answered.
Question 1 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
Question 2 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following C# code snippet? class box { public int width; public int height; public int length; public int volume1; public void volume() { volume1 = width * height * length; } public void volume(int x) { volume1 = x; } } class Program { static void Main(string[] args) { box obj = new box(); obj.height = 1; obj.length = 5; obj.width = 5; obj.volume(5); Console.WriteLine(obj.volume1); Console.ReadLine(); } } a) 0
Question 3 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What is the process of defining more than one method in a class differentiated by parameters known as?
Question 4 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following C# code snippet? class Program { static void Main(string[] args) { int x, y = 1; x = 10; if(x != 10 && x / Convert.ToInt32(0) == 0) Console.WriteLine(y); else Console.WriteLine(++y); Console.ReadLine(); } }
Question 5 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following C# code snippet? class equality { public int x; public int y; public Boolean isequal() { return (x == y); } } class Program { static void Main(string[] args) { equality obj = new equality(); obj.x = 5; obj.y = 5; Console.WriteLine(obj.isequal()); Console.ReadLine(); } }
Question 6 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following C# code? class box { int width; int height; int length; int volume; void volume(int height, int length, int width) { volume = width * height * length; } } class Prameterized_method { public static void main(String args[]) { box obj = new box(); obj.height = 1; obj.length = 5; obj.width = 5; obj.volume(3, 2, 1); Console.WriteLine(obj.volume); Console.ReadLine(); } }
Question 7 of 7
★ FPSC
★ PPSC
★ FPSC
★ PPSC
What will be the output of the following C# code snippet? class equality { int x; int y; boolean isequal() { return(x == y); } } class Output { public static void main(String args[]) { equality obj = new equality(); obj.x = 5; obj.y = 5; Console.WriteLine(obj.isequal()); } }
✓ Link copied to clipboard
Continue Your Practice
Next Practice Set → Advance Html — Part 1
Master the next curriculum module with 40 exam-standard MCQs.
💡 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.