Can lens of slr camera work in a dslr camera?

If you are transferring it onto a camera with the same mount then yes. But be aware AUTO FOCUS MAY NOT WORK CORRECTLY. The aperture of the lens may not be as good either. But overall you should be OK.
Good Luck