Why I cannot write smthng like this?
int i, size;
int *arr;
...
for(i = size - 1, while(arr[i] == 0) i--; i >= 0; i--) { ... }
This is just no valid syntax in C.
A Solution for what you want might be:
int i, size;
int *arr;
...
for(i = size - 1; i >= 0; i--) {
if (arr[i] == 0)
continue;
...
}