Skip to content
This repository was archived by the owner on Sep 27, 2023. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion 02-Sorting array in ascening order.c
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
//Programme to sort arrray in ascending order

/*
* C program to accept N numbers and arrange them in an ascending order
*/

#include<stdio.h>

/* header file is included. */

void main()
{
int Size_of_array;

*/ we can also used this as int A[10] this means we have declared the array of integer type and whose size is 10,and the name of the array is A */

printf("Enter the size of array : ");
scanf("%d", &Size_of_array);
Expand Down Expand Up @@ -38,9 +46,11 @@ void main()
}

printf("\b\b}\nThe sorted Array is in ascending order...\n{");

*/ when displaying \b would move the cursor one step back, this is why we have used /b here just for formating purposes .*/
for (int i = 0; i < Size_of_array; i++)
{
printf("%d, ", array[i]);
}
printf("\b\b}\nSteps take are %d", steps);
}
}