the founction not returning any value : hey this is my code for school and its not working i should check in this code
if the arr in the prev position is bigger or smaller from the follow one if its bigger for all the array so i should return the value 1 
if in some point in the array the prev position of the arr is bigger then then folow one so its shold reutrn the value 0 thank for any help
    
    
    
    
    #include <stdio.h>
    #include <stdlib.h>
    int Up_array(int *arr,int Size )
    {
    	int i;
    	for(i=0;i<Size;i++)
    	
    		if (arr[i] > arr[i+1]) 
    		{
                return 0;
            }
            else if(arr[i] <= arr[i+1]) 
            {
                return 1;
            
    }	
    }		
    
    
    
    
    void main ()
    {
    int *arr,Size,i;
    	
    printf("please enter the size of the array\n");
    scanf("%d",&Size);
    arr=(int*)malloc(Size*sizeof(int));
    printf("please enter the array\n");
    for (i=0; i<Size ;i++)
    scanf("%d",&arr[i]);
    Up_array(arr,Size);
    free(arr);
    system("pause");
    }