Read and sort an array of integers //Program To Input Values Into An Array And Sort Them In Ascending Order
#include&lt;stdio.h&gt;
//Function To Print The Array Values
void print(int tab[],int n)
{
    int i;
    printf(&quot;The Values Are : \n&quot;);
    for(i=0;i&lt;n;i++)
    {
        printf(&quot;%d &quot;,tab[i]);
    }
        printf(&quot;\n&quot;);//Line Jumping For Better Output
}
//Function To Swap The Values In The Array
void swap(int* x,int* y)
{
    int temp=*x;
    *x=*y;
    *y=temp;
}
//Function To Sort The Values In The Array By Using Previous Function
void sort(int tab[],int n)
{
    int i,j;
    for(i=0;i&lt;n-1;i++)
    {
        for(j=i+1;j&lt;n;j++)
        {
            if(tab[i]&gt;tab[j])
            {
                swap(&amp;tab[i],&amp;tab[j]);//Swaps The Value Of Index i With The Value Of Index j In The Array
            }
        }
    }
}
//Main Code
int main()
{
    int i,n,tab[100];
    printf(&quot;Give The Number Of Elements In The Array:&quot;);
    scanf(&quot;%d&quot;,&amp;n);
    while(n&lt;=0)
    {
    printf(&quot;The Number Of Elements MUST Be Superior To 0!\n&quot;);
    printf(&quot;Give The Number Of Elements In The Array:&quot;);
    scanf(&quot;%d&quot;,&amp;n);
    }
    printf(&quot;Insert %d Values :\n&quot;,n);
    for(i=0;i&lt;n;i++)
    {
        scanf(&quot;%d&quot;,&amp;tab[i]);
    }
    print(tab,n);//Prints The Values In The Array
    sort(tab,n);//Sorts The Values In The Array
    printf(&quot;SORTING....\n&quot;);
    print(tab,n);//Prints The Values In The Array
    return 0;
}
General Observations
Good job creating functions and the naming of the functions. The naming of the variables could probably be improved, for instance n could be renamed to item_count or array_element_count.
The indentation is inconsistent. This could lead issues during maintenance of the code.
Missing Function
As stated above you did a pretty good job of creating functions, but you missed one, the input of the array should be a function as well.
Logical Order of Printing
Put printf(&quot;SORTING...\n&quot;); before the call to the sort() function.
Comments
Since you did a good job of naming the functions most of your comments are unnecessary. For instance //Swaps The Value Of Index i With The Value Of Index j In The Array really doesn't add anything.
Arguments for Swap Function
Rather than passing in 2 pointers to values and swapping the values I might pass in the array and the 2 indexes and use array notation in the swap function to relocate the values.
Missing Error Check
The code to input the array properly checks to see that the value of the size of the array is greater than 0, but it doesn't check that the size of the array is less than than the maximum size.