void main should be int main.
Arrays indexes go from 0 to size - 1. You have buffer overruns.
You are overwriting the same arrays multiple times.
You are trying to return a single index from func1 instead of the entire array (which can't be done anyway).
Your i and j are global variables (they should be local).
iostream.h should be iostream.
stdio.h should be cstdio. Do you even need it? I don't think so.
conio.h is non-standard and should be avoided. Use std::cin.get() instead of getch().
Well, that's a start anyway. You could make the code a little prettier, too.

06-25-2013

karthikslegend

Thank you Elysia.. But I can't get you bcoz I'm a begginer, will u help me editing this program..

06-25-2013

laserlight

What do you have trouble understanding in Elysia's statements?

06-25-2013

karthikslegend

My compiler only runs the program if I include iostream.h and stdio.h, and what's that array index go from 0 to -1, I can't get that. But its showing a linker error.

06-25-2013

karthikslegend

And i'v to call the function func1, so i have to declare main as void only, how can I use int there.

06-25-2013

karthikslegend

And I'm a begginer too, so dont get annoyed with my questions.

06-25-2013

Elysia

The first step is to get a modern IDE/compiler. Here is a list: http://cpwiki.sf.net/IDE
Code::Blocks is a very good IDE if you download it together with gcc (there's a link on their homepage with that bundle).

This will result in a linker error if you try to call func1 from a function before the "void func1" (the definition) is seen by the compiler (ie, the code for it is above it). The reason is that the compiler thinks the return type is int, but later when the linker tries to put the program together, it can't find such a function.
If you don't understand this, then review how the compilation process works might help.