03 Common Coding Interview Questions For .NET Interview
03 Common Coding Interview Questions For .NET Interview
NET Interview
TechnicalInterviewQuestion.zip
This article explains commonly asked coding example questions in technical rounds for .NET
interviews. Here, I have given some examples with the code to help the developers prepare for a
technical interview. It looks simple but during the interview, it will be difficult to explain or write on
paper.
I have attached the source code with this article for all the below examples.
31.
32. Console.WriteLine(Environment.NewLine);
33. //Write Program to find number of words in string
34. ReverseStringWords("Jignesh Kumar");
35.
36. Console.WriteLine(Environment.NewLine);
37. //Write Program to find consicutive character in string
38. char[] charArray = { 'A', 'B', 'B', 'C', 'D', 'D', 'E', 'F', '
39. FindConsicutiveCharacter(charArray);
40.
41. Console.WriteLine(Environment.NewLine);
42. //Write Program to check string is palindrome or not
43. string[] strArray = { "WOW", "NOON", "ABBA", "ANNA", "BOB", "J
44.
45. foreach (var item in strArray)
46. {
47. Console.WriteLine(" {0} Is palindrome {1}", item, IsString
48. }
49.
50. Console.WriteLine(Environment.NewLine);
51. //Write program to check number is palindrome or not
52. int number = 121;
53. Console.WriteLine("
{0} is Palindrome number {1} ", number, IsNumberPalindrome(number));
54.
55. Console.WriteLine(Environment.NewLine);
56. //Write program to check number is palindrome or not
57. number = 127;
58. Console.WriteLine("
{0} is prime number {1} ", number, IsNumberPrime(number));
59. number = 128;
60. Console.WriteLine("
{0} is prime number {1} ", number, IsNumberPrime(number));
61. Console.ReadLine();
62. }
17. }
18.
19. public static string FibbonacciSeries1(int n)
20. {
21. int a = 0, b = 1, c;
22. StringBuilder sb = new StringBuilder();
23. for (int i = 1; i < n; i++)
24. {
25. sb.Append(a.ToString() + ",");
26. c = a + b;
27. a = b;
28. b = c;
29. }
30. return sb.ToString().Remove(sb.Length - 1); ;
31. }
Write a program to calculate factorial value for a given number
01. private static int Factorial(int number)
02. {
03. int fact = 1;
04. if (number == 0)
05. return 0;
06. if (number == 1)
07. return 1;
08.
09. for (int i = 1; i <= number; i++)
10. {
11. fact = fact * i;
12. }
13. return fact;
14. }
20. else
21. {
22. list.Add(item);
23. }
24. }
25. Console.WriteLine("Duplicate Found : {0} ", result);
26. }
27. }
Please find my other articles if you wish to read more about .NET and other cutting-edge
technologies.
Swagger UI Integration With Web API For Testing And Documentation Click Here
Tricks and Tips In Visual Studio To Speed Up Your Code Using Default Code Snippet
Feature Click Here
Create Documentation With Sandcastle Help Builder Click Here
Test Web API using SoapUI Click Here
Getting Started with TypeScript Click Here
LINQ extension methods Click Here
https://www.c-sharpcorner.com/article/net-programing-interview-questions/ 7/10
12/2/24, 2:17 PM Common Coding Interview Questions For .NET Interview
DateTime in C#
Download Now!
SIMILAR ARTICLES
Jignesh Kumar
Tech Lead | Blogger | Content Creator | Full Stack Developer | 6 time C# Corner MVP
https://www.techjigs.com
32 2.8m 6
Type your comment here and press Enter Key (Minimum 10 characters)
https://www.c-sharpcorner.com/article/net-programing-interview-questions/ 8/10
12/2/24, 2:17 PM Common Coding Interview Questions For .NET Interview
https://www.c-sharpcorner.com/article/net-programing-interview-questions/ 9/10
12/2/24, 2:17 PM Common Coding Interview Questions For .NET Interview
About Us Contact Us Privacy Policy Terms Media Kit Sitemap Report a Bug FAQ Partners
Web3 Universe Build with JavaScript Let's React DB Talks Jumpstart Blockchain Interviews.help
©2024 C# Corner. All contents are copyright of their authors.
https://www.c-sharpcorner.com/article/net-programing-interview-questions/ 10/10