char in[100], *temp[10],var[10][10];
    int i, n = 0,fulval=0;
	double val[10];

it should be simple but i cannot figure it out. I want to assign "ANS" to var[0][0,1,2] but it did not work?

you have the val declared twice -- once on line 1 and again on line 3. You can not use the same variable name twice like that.

line 4: you have to call strcpy() to do it: strcpy(var[0],"ANS"); The = assignment operator will not work on character arrays.