I just started learning c. I have a code here for taking input from users and printing it.
#include <stdio.h>
#include <stdlib.h>
int main()
{
int a[5];
int i ;
for(i=0;i<5;i++)
{
printf("enter the %d position no: ",i+1);
scanf("%d \n",&a[i]);
}
for(i = 0;i<5;i++)
printf("position %d : %d \n",i+1,a[i]);
}
Here is my output console.
But the output is giving misleading result. at line 2 when scanf is reding it is not showing the string "enter the %d position" it is directly asking for value.