Q:

Invalid int in scanf and printf

I recently started learning the C language programming and now I was doing this simple program where I was supposed to ask the user for 5 numbers and display them on the opposite order. I managed to do it just fine but there's a huge problem. The first number is ridiculous. I can't really explain it so I'll leave an image to show it:

And here's the Code:
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void main()
{
    int numeros[5];
    int i;

    for (i=0; i<5; i++) {
        scanf("%i", &numeros[i]);
    }
    for (i=5; i>0; i--) {
        printf("%i \n", numeros[i]);
    }

    system("pause");
}

A:

Arrays start from index 0 and goes till n-1. So you have defined you array as numeros[5], so your n = 5. Hence your array start from 0 goes till 5-1=4.
The number that you get (negative number in screen shot) is a garbage value and may/may not differ from run to run and from machine to machine as you are trying to access numeros[5].
Hence you need to change your for loop from
for (i=5; i>0; i--){

to
for (i=4; i>=0; i--){

A:

Your second loop must be
for (i=4; i>=0; i--)

instead of 
for (i=5; i>0; i--)

As they start with 0 and end with length-1
They can be depicted as.

Thus the value you are trying to read is out of the array and is thus garbage

