Used float as a data type instead of long long int. So why its giving me wrong answer even o/p matches with required o/p????

  1. int main()
  2. {
  3. long int i,t;
  4. float *n;
  5. scanf("%ld",&t);
  6. n=(float )malloc(tsizeof(float));
  7. for(i=0;i<t;i++)
  8.  scanf("%f",n+i);
    
  9. for(i=0;i<t;i++)
  10.  printf("%0.0f\n",(*(n+i)-1));
    
  11. return 0;
  12. }

are you sure that range of input will be well within the range of float ?