Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 2 subjective questions C# Programming Fundamentals

INT402 — Modern Web Programming Tools And Techniques 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define variables and data types in C#. Explain the major categories of C# data types with suitable examples.

  2. Question 2 of 20

    Write and explain a simple C# Hello World program. Describe the purpose of each major component.

  3. Question 3 of 20

    Explain the different types of operators available in C#. What is operator precedence and how can parentheses affect an expression?

  4. Question 4 of 20

    Describe the conditional statements supported by C#. Illustrate if, if-else, else-if ladder, and switch with examples.

  5. Question 5 of 20

    Compare the for, while, and do-while loops in C#. Give their syntax, working, and suitable use cases.

  6. Question 6 of 20

    Explain the purpose of the break, continue, return, and goto jump statements in C#. Provide an example of each.

  7. Question 7 of 20

    What is an array in C#? Explain one-dimensional, multidimensional, and jagged arrays with examples.

  8. Question 8 of 20

    Describe common techniques and methods used to manipulate arrays in C#. Explain traversal, searching, sorting, reversing, copying, and resizing.

  9. Question 9 of 20

    Explain the string type in C# and discuss any five commonly used string methods or properties with examples.

  10. Question 10 of 20

    How are strings manipulated in C#? Compare string concatenation, interpolation, Split, Join, and StringBuilder.

  11. Question 11 of 20

    Define object-oriented programming. Explain its principal concepts and state the advantages of using OOP in C#.

  12. Question 12 of 20

    Explain classes and objects in C#. Write a class containing fields, properties, and methods, and demonstrate object creation.

  13. Question 13 of 20

    Distinguish between encapsulation and abstraction in C#. How are access modifiers, properties, abstract classes, and interfaces related to these concepts?

  14. Question 14 of 20

    What is a constructor in C#? Explain default, parameterized, copy-style, static, and private constructors, including constructor overloading and chaining.

  15. Question 15 of 20

    Explain inheritance in C#. Discuss base and derived classes, types of inheritance supported by C#, member accessibility, and the use of the base keyword.

  16. Question 16 of 20

    What is polymorphism? Compare compile-time polymorphism and runtime polymorphism in C# with examples of method overloading and method overriding.

  17. Question 17 of 20

    Explain abstract classes and abstract methods in C#. How does an abstract class differ from a concrete class and an interface?

  18. Question 18 of 20

    Describe exception handling in C#. Explain try, catch, finally, throw, multiple catch blocks, and custom exceptions.

  19. Question 19 of 20

    Develop a C# program that reads a collection of marks, validates the input, stores the values in an array, and displays the total, average, highest mark, and result category. Explain the concepts used.

  20. Question 20 of 20

    Design an object-oriented C# model for an employee payroll system using encapsulation, constructors, inheritance, polymorphism, an abstract class, arrays, string manipulation, and exception handling.

That's unit 2

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.