In C a string is a array of chars, and an array is simply a pointer to the first location of memory of the array.
So defining
char* ptr="MET ADSD";
you are declaring and initializing an array of chars, a string, by using a pointer to char,
The next trick comes if you consider this two factors:
- pointers arithmetic in that using the operator
++
on a pointer increments its value, the memory address it is pointing to
- char size which is almost everywhere 1 byte
So you are scaling the array along of two positions, and you print that by using %s
and passing the pointer to it
EDIT I guess you put %c mistakenly in the example