Who ever told you to bubble sort an array to find the largest integer needs to take some of those quizzes for their self.

1) Put the variables in to an array
2) loop through the array (for, while, do while, you choose)
3) compare each number to a "max" variable, if bigger than replace "max" with the new high

Forget about sorting in general, it serves no purpose for your task.

Code:
int variables[8];

for(int i = 0; i < 8; i++) {
    variables[i] = i; // or what ever value you want
}