C# – Repeated Interview Programs

  1. Implement a Singleton Design Pattern with thread safety.
  2. Find the count of repeated words in a given sentence.
  3. Explain the Factory Design Pattern with a working example.
  4. Write a generic method or class to demonstrate reusability.
  5. Demonstrate Lazy Loading in C# (with example using Lazy<T>).
  6. Find the count of repeated letters in a given word.
  7. Write a program to reverse a string without using built-in functions.
  8. Find the count of duplicate numbers in an integer array.
  9. Find duplicate numbers using LINQ and lambda expressions.
  10. Write a program to calculate the sum and reverse of digits of a number.
  11. Explain and provide examples of SOLID Principles in C#.
  12. Create a Custom Middleware in ASP.NET Core.
  13. Write a program to check if a string is a palindrome.
  14. Find the maximum and minimum numbers in an integer array.
  15. Write a program to swap two numbers without a temporary variable.
  16. Implement a Dependency Injection (DI) example in ASP.NET Core.
  17. Write a program to find factorial using recursion.
  18. Find the second largest number in an array.
  19. Write a program to remove duplicates from a list using LINQ.
  20. Write a program to count vowels and consonants in a string.
  21. Explain and demonstrate the Observer Design Pattern.
  22. Write a program using async and await to perform asynchronous operations.
  23. Implement Exception Handling using try, catch, finally, and custom exceptions.
  24. Write a simple LINQ query to filter, group, and order data.
  25. Demonstrate Extension Methods in C#.
  26. Explain Encapsulation, Inheritance, and Polymorphism with examples.
  27. Write a program to find missing numbers in an integer array.
  28. Write a program to reverse words in a sentence.
  29. Demonstrate interface vs abstract class with sample code.
  30. Write a program to convert JSON to object and vice versa using System.Text.Json.
  31. Implement a Thread-safe Singleton using Lazy<T>.
  32. Demonstrate async/await with Task.WhenAll for parallel processing.
  33. Write a program to implement caching in ASP.NET Core.
  34. Implement a Custom Attribute and use Reflection to read it.
  35. Write a program to log requests and responses in ASP.NET Core middleware.
  36. Explain the Repository and Unit of Work Patterns with code.
  37. Demonstrate AutoMapper usage in ASP.NET Core.
  38. Write a program to read/write data from a file asynchronously.

-Thank you, happy coding !!

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *