Write a C program to sort array in ascending order

Write a C program to sort array in ascending order.

#include
#include
#define MAX_SIZE 100

int main()
{
    int array[MAX_SIZE];
    int size;
    int i, j, temp;

    /* Input size of array */
    printf("Enter size of array: ");
    scanf("%d", &size);

    /* Input elements in array */
    printf("Enter elements in array: ");
    for(i=0; i array[j])
            {
                temp     = array[i];
                array[i] = array[j];
                array[j] = temp;
            }
        }
    }

    /* Print the sorted array */
    printf("\nElements of array in sorted ascending order: ");
    for(i=0; i