Question: I have this code and i wanna know why tha variable is not returning any value outside the for loop.

```
void juizes_nota_alta(str_nomepont a)
{
    int i,j;
    int notamax=0;
    for (i=0;i<MAX_JUIZES;i++)
    {
        if (a.pontuacao[i]>notamax)
        {
            notamax=a.pontuacao[i];
            j=i;
        }

    }
    printf("O juiz que deu a nota mais alta foi:\n",j);

```

Variable j is not returning value.

Thank you

Answer: 
Your `printf()` is wrong.

It should include a `%d` conversion specifier. The string controls what gets printed, just passing more arguments won't make them show up unless the string says so.

Addressing that will bring you one more step closer. Also add `j = 0` before the loop to make sure `j` has a valid value when you print it.
Initializing a variable based on some condition is not a good idea.

If the condition fails and the variable never gets initialized and when you try to use the variable you have an indeterminate variable value

So just before assigning `j` to anything while declaring make 

```
int j=0;

```

In your `printf()` as suggested by everyone use `%d` format specifier.