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

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.

thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.