Please find the error. really don't like the doubt section of cb

Hello @raj.verma5454,

Your code is failing for the test cases like:

  1. 1
    10111 00110
    Expected Output:
    10001
    Your Output:
    001
    Reason:
    After the third iteration, b will become zero
    Thus, while loop will terminate giving the wrong answer.

  2. You are supposed to print output for each test case on a separate line.
    3
    10101010 11111111
    10000000 00000001
    1010101 0101010
    Expected Output:
    01010101
    10000001
    1111111
    Your Output:
    01010101100000011111111

Modified Code:

Are you facing any problem with the doubt section?
Let me know.

Hope, this would help.
Give a like if you are satisfied.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.