Remove the trailing newline from your scanf format strings thus:
scanf("%d", &marks[1]);
You could also simplify your code to:
int marks[5];
for (int i = 0; i < 5; ++i)
{
printf("Enter the value for marks%d: ", i + 1);
scanf("%d", &marks[i]);
}
printf("The value of marks is %d, %d, %d, %d and %d\n", marks[0], marks[1],
marks[2], marks[3],marks[4]);