Both loop are independent and replacing value at same place(memory)


#1

both loop are independent and will run (M+N) times which is the total times taken, and stored value at same memory space a and b address locations.