code- https://ide.codingblocks.com/s/227534
showing 8 instead of 4
Showing incorrect Sum
*instead of 16 it is showing incorrect result
hello @anubhavb11
you logic is correct. you are getting different answer becuase u have not initialise the two array correctly.
pls check how to intialise 2 array.
Thank you it was done by mistake