in my code according to for loop Condtion it is clear that it must iterate only 5 times from 0 to 4. But it is taking 6 input from the user. Why it is happening. Please clear my doubt.
#include <stdio.h>
#include <conio.h>
void main() {
int i, num;
clrscr();
printf("Enter 5 elements in the array\n");
for (i = 0; i < 5; i++) {
scanf("%d\n", &num);
}
getch();
}