Whats wrong in this code,its working in coding blocks IDE

hello @sneha23

a) increase ur array size (check constraints)

b)
image
add -1 in itt-a because upper bound will return index 1 greater than the required index

c)
image
declare p as int variable instead of array

I guess @aman212yadav it was a glitch. Never mind :slight_smile:

1 Like

@sneha23
check ur updated code here->

OH I M REALLY SORRY FOR TROUBLING U FOR SUCH SILLY MISTAKES
THANKS ANYWAYS
CLOSING THE DOUBT!!