I am trying to fill an array with 10 integers starting from 5 by 1. I dont see what is wrong with my code. I'm getting junk data.
Code:#include <stdio.h> #include <stdlib.h> int main () { int ia[10], *p, x; x=0; printf("Contents of array ia:\n"); while (x<10) { ia[x]=x+5; x++; printf("%d\n", ia[x]); } return 0; }