To find the difference between 777 and its nearest perfect square: 
- First, identify the perfect squares near 777. 
- Calculate the square root of 777 approximately: 
\(\sqrt{777} \approx 27.87\) (since \(27^2 = 729\) and \(28^2 = 784\)) 
- Now check the difference between 777 and the nearest perfect squares: 
\(777 - 729 = 48\) 
\(784 - 777 = 7\) 
- The nearest perfect square to 777 is 784. 
- The difference between 777 and 784 is 7. 
Therefore, the difference is 7. 
Hence, the correct answer is option (B) 7.