Question: I have a problem in C. I have this function :

```
int test(void *data);

```

I want to change *data* with this function but I don't want another prototype (not use void \*\*). Actualy, data equals null out this function.

```
#include <stdio.h>
#include <stdlib.h>

int
test(void *data)
{
  data = "toto";

  return 1;
}

int
main()
{
  void *d;

  if (test(d) != 1) {
    printf("erreur\n");
  }

  printf("résultat : %s\n", (char *) d); // displays "résultat : (null)"

  return 0;
}

```

Help me please. ;)

Answer: 
If you have the Symbolic Toolbox, [`vpa`](http://es.mathworks.com/help/symbolic/vpa.html) does that. You can specify the number of significant digits you want:

```
x = '2'; %// define x as a *string*. This avoids loss of precision
n = 100; %// desired number of *significant* digits
result = vpa(['sqrt(' x ')'], n);

```

The result is a [symbolic variable](http://es.mathworks.com/help/symbolic/symbolic-variables-expressions-and-functions.html). If needed, convert to a string:

```
result = char(result);

```

In the example above,

```
result =
1.414213562373095048801688724209698078569671875376948073176679737990732478462107038850387534327641573

```

Note that this is subject to **rounding**. For example, the result with `n = 7` is `1.414214` instead of `1.414213`.

In **newer Matlab versions** (tested on R2017b), using a char input with `vpa` is discouraged, and support for this may be removed in the future. The recommended approach is to first define the variable as symbolic, and then apply the required operations to it:

```
x = sym(2);
n = 100;
result = vpa(sqrt(x), n);

```
It seems you need a method of [digit-by-digit root calculation](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Digit-by-digit_calculation) that was discovered long before computer era.