the result i am getting is not correct.And i do not know where the mistake is.. please help me.
the output of above is :-
the result is -5568.
Code:
#include <stdio.h>
#include <ctype.h>
int fun(int *v,int *r);
main()
{
static int v[1][3]={{740,10,0}};
static int r[1][3]={{20000,10000,0}};
int result;
result=fun(&v[0][0],&r[0][1]);
printf("the result is %d",result);
return 0;
}
int fun(int *v,int *r)
{
int temp;
temp=*v * *r;
return (temp);
}
the result is -5568.
Comment