amol0010

09-20-2009, 04:39 AM

I have a text file called int50.txt filled with integers.

like this -

3

4

12

-12

-10

91

I also have 2 arrays with 3 integers each a[3], b[3].

I need to create a function, which populates array A with the first three elements, b with the next 3 elements.

Such that a[3] = {3,4,12} and b[3] = {-12,10,91}

OK..another thing I dont want to use pointer or reference variables. I specifically want to do this with local/parameters.

I already know how to do it using pointers, i.e. passing an array as a pointer to the function.

How do I do this ??

like this -

3

4

12

-12

-10

91

I also have 2 arrays with 3 integers each a[3], b[3].

I need to create a function, which populates array A with the first three elements, b with the next 3 elements.

Such that a[3] = {3,4,12} and b[3] = {-12,10,91}

OK..another thing I dont want to use pointer or reference variables. I specifically want to do this with local/parameters.

I already know how to do it using pointers, i.e. passing an array as a pointer to the function.

How do I do this ??