One testcase fails in this code.Please help me out

https://ide.codingblocks.com/s/50310

hey kunj, your loop in line 12 will go from (int i =0;i<n-1;i++) and loop in line 13 will go from (int j= i+1;j<n;j++)
other wise you code is also checking sum on same index. like a[2]+a[2]==target