The order of C code is Weird

okok so when I write programs, I try to only declare variables at the top of a function, never mixed into the actual code. Further, I try to sort the variables by the order in which they will be used in the function. This helps me sort of intuit what the function is doing just by reading the variable list, and it adds some canonicity to the list that isn't alphabetical sorting (barf).

But I realized something kind of funky with that way of sorting. Considering the following function:

void whatever(void) {
	struct stat st;
	int result;

	result = stat("whocares.txt", &st);
	// (whatever else)
}

Notice here how I put st ahead of result. Despite result appearing first in the text, as the program is run, st will actually get used first!

That's all haha :3