As per my knowledge , arithmetic operations on void pointers is not allowed unless properly typecasted.
However the above code always increments , decrements the void *k properly without any error or warning.Code:int main(){ float i = 10; void *k; k = &i; printf("%u \n" , k); k = k-4; printf("%u\n" ,k); getch(); return 0; }
For a single increment , it takes the address value from, example 227315 to 227316.
Hows this thing working ?