Question: How to get the current character index (in C) ?

```
char *s = "abcdefghijklmopqrstuvwxyz";
*s++;
*s++;
*s++;
printf("%c\n", *s);    // print character 'd'
printf("%d\n", s - *s);    // should print 3, but not working

```

I expect to get index (3), but how to code it programatically ?

Answer: 
```
char *s = "abcdefghijklmopqrstuvwxyz";
char *t = s;
*s++;
*s++;
*s++;
printf("%c\n", *s);    // print character 'd'
printf("%d\n", s - t);    // print 3

```

should do it.
You'll need to move another pointer (not the `s` pointer), to the third index, or any index for that matter. Then you can do pointer subtraction where the difference is the number of byte-elements between the pointers.

```
const char s[] = "asdf";
const char *s2 = s + 2;
printf( "%d", s2 - s ); // 2

```