It is quite difficult for us to know what's wrong when you've left out a lot of code. Either post a small compilable snippet that demonstrates the problem or go debug it yourself.
A good idea is to use assert and put it everywhere in your program to check for things that should never be. For example, a pointer being NULL when you don't expect it to.
Carefully read the documentation of all functions and see what they take and what they return. Then put asserts to check that what you're giving it is valid and what it returns is valid.
Example:
Code:char *mass = NULL;
float m;
char *WINGSPAN = NULL;
float wingspan;
char *s = NULL;
float S;
for (i=0;i<=lineno; i++) // Should probably be 0 to lineno - 1.
{
assert(array[i] != NULL);
param[i]=strtok(arra[i],delims);
param2[i]=strtok(NULL,delims);
assert(param[i] != NULL);
assert(param2[i] != NULL);
printf("param[i] is %s\n",param[i]);
printf("param2[i] is %s\n",param2[i]);
if (strcmp("Mass*",param[i])==0) if(mass==NULL) mass=param2[i];
if (strcmp("Wingspan*",param[i])==0) if (WINGSPAN==NULL) WINGSPAN=param2[i];
if (strcmp("Wing area*",param[i])==0) if (s==NULL) s=param2[i];
}
m=atof(mass);
printf("Mass is %f kg\n",m);
wingspan=atof(WINGSPAN);
printf("Wingspan is %f m\n",wingspan);
S=atof(s);
printf("Wing area is %f m2\n",S);