Subj : Re: Problem with READDATA function To : borland.public.cpp.borlandcpp From : " Bruce Salzman" Date : Mon Aug 18 2003 11:16 pm "Kristine" wrote in message news:3f4169da$1@newsgroups.borland.com... > > hi all- I am having a problem with my readdata function. Can anyone advise? > thanks- > k > void readdata (int x[], int r) > { > int i; > > for (i=0; i scanf("%d", x[i]); > printf("%d", x[i]); > } scanf expects the address of an integer to store the input, but x[i] is the value at x + i You need scanf("%d", &x[i]); Regards, Bruce .