The correct option is C 839
Let the number be N.
When a number is divided by 5, a remainder of 4 can be thought of as a remainder of −1.
So, N=5a−1 or N+1=5a
Similarly,
N=6b−1 or N+1=6b
N=7c−1 or N+1=7c
N=8d−1 or N+1=8d
N+1 can be expressed as a multiple of (5,6,7,8)
Now, smallest value of N+1= LCM of (5,6,7,8)
⇒ Smallest value of N= LCM of (5,6,7,8)−1
=840−1=839