Programming examples of Array in C#

In this chapter you will learn about some programming examples of array in C#.

Qu 1:Write a program of sorting an array. Declare single dimensional array and accept 5 integer values from the user. Then sort the input in ascending order and display output.


Enter number:      56
Enter number:      34
Enter number:      23
Enter number:      1
Enter number:      76Elements of array are:56      34      23      1      76

Elements of array are:

1       23      34      56      76


Qu2: Write a program to create two multidimensional arrays of same size. Accept value from user and store them in first array. Now copy all the elements of first array are second array and print output.


Enter your option <1-7> for days. 1 for Monday: 9
Invalid option. Please try againEnter your option <1-7> for days. 1 for Monday: 2



In this chapter you studied some programming examples of array. In next chapter you will get some programming exercises of array.

Has one comment to “Programming examples of Array in C#”

You can leave a reply or Trackback this post.

Write a Reply or Comment

Your email address will not be published.