+ 2
Make 2 changes : int LengthOfBinary=count; // not count+1 Reversed[count2]=Binary[count-1]; // not count
1st Apr 2022, 11:52 AM
Jayakrishna 🇼🇳
+ 2
You are adding Binary[count]=r; after that increasing count++; So last value in Binary is count-1 now. So new reverse array length is enough to count and loop it till i<count ;, count+1 is 2 more extra spaces and print garbage values..
1st Apr 2022, 12:29 PM
Jayakrishna 🇼🇳