Sei sulla pagina 1di 3

Collection of C# program exercises 1. Write a program to print hello. 2. Write a program for command line arguments 3.

Write a program for multiple main blocks. 4. Write a program to create alias of namespace 5. Write a program to input from user. 6. Write a menu driven program to implement all operators. 7. Write a program to find the number of and sum of all integers greater than 100 and less than 200 that are divisible by 7. 8. Write a program to print 2-D square root table to provide the square root of any number between 0 to 9.9. 9. Write a program to print reverse of given number. 10. Write a program to print pascal triangle.

11. Write a program to accept five values in US dollars, one at a time and convert each value entered into Indian rupees equaling before the next value is requested. 12. . Write a program to calculate the standard deviation of an array of values. Use methods standard and mean to calculate standard deviation and mean of values. 13. Write a void type method that takes 2 integer type values parameters 1 integer type out parameter and returns the product of two value parameters through output parameter. 14. Write a method to accept n number of parameters and calculate largest of these values. 15. Write a program to swap to number by using call by reference. 16. Write a program to create two 1-D arrays A and B which are sorted in ascending order then create an array C that contains every item from array A and B in ascending order.

17. Write a program to print the total of 5 customers who has purchased different number of items. 18. Write a program to implement String function.

19. Write a program to that reads a line of text containing three words and then replaces all the blank spaces with an underscore (_). 20. Write a program the counts the number of occurrences of a particular character in a line of text. 21. Store a string 123456789 in a string variable and use it to display the following pattern. 1 232 34543 4567654 567898765 22. Design a structure data type named dateofbirth to contain date, month and year of birth. Develop a program using this data structure that would assign your date of birth to the individual members and display the date of birth in the following format a. My date of birth is 16/06/1983 23. Modify the above program using a. A constructor to input values to the individual members. b. Method to display the date of birth. 24. Create enumeration for different rate of interest for different account types and write a program to use this enumeration to calculate interest. 25. 26. 27. Write a program implements properties. Write a program implements indexers. Write a program implements arraylist class.

28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38.

Write a program implements array class. Write a program implements stringbuilder class. Write a program to implements method overloading. Write a program to implements constructor overloading. Write a program to implements copy constructor Write a program to implements this reference. Write a program to implements static constructor. Write a program to implements static members. Write a program to search string starting with number. Write a program to implement for each with 2-D array. Write a program to implements Boxing and Unboxing.

Potrebbero piacerti anche