still it's not working

On Thu, Jun 30, 2011 at 4:42 PM, Rujin Cao <drizzle...@gmail.com> wrote:

> int maxdiff(int );
> int maxdiff(int arr[]);
>
> The signatures of  maxdiff function are  not the same.
>
>
> On Fri, Jul 1, 2011 at 6:53 AM, ashwini singh <asingh...@gmail.com> wrote:
>
>> this code gives an error ([Warning] passing arg 1 of `maxdiff' makes
>> integer from pointer without a cast) . Please explain the reasons.
>>
>>
>> #include<stdio.h>
>> #include<conio.h>
>> int maxdiff(int );
>> main()
>> {
>>       int p,arr[]={2,4,1,6,23,4};
>>       p=maxdiff(arr);
>>       printf("\n MAX Diff is \t %d",p);
>>       getch();
>>       }
>> int maxdiff(int arr[])
>> {
>>     int diff=0,len,i,j;
>>     unsigned p;
>>     len=sizeof(arr)/sizeof(arr[0]);
>>     for(i=0;i<len;i++)
>>     {
>>       for(j=i;j<len;j++)
>>       {
>>          p=arr[j]-arr[i];
>>          if((p-diff)>0)
>>          diff=p;
>>       }
>>     }
>>     return diff;
>>     }
>>
>> --
>> with regards,
>> Ashwini kumar singh
>> ECE Final yr.
>> NIT Allahabad
>> **
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "Algorithm Geeks" group.
>> To post to this group, send email to algogeeks@googlegroups.com.
>> To unsubscribe from this group, send email to
>> algogeeks+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/algogeeks?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to algogeeks@googlegroups.com.
> To unsubscribe from this group, send email to
> algogeeks+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
with regards,
Ashwini kumar singh
ECE Final yr.
MNNIT Allahabad
*Mobile: *7505519402

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to