Code not giving correct output?

Please tell me where the code is wrong

@kt62495 hey,apne res_size ko 1 se initialise krke utne size ki hi array li hui hai mtlb result 1 size ki array hi bni hui hai ,please correct that you will get it.

Now its working fine. Thank You

@kt62495 welcome bro please cloe the doubt and give rating.