Any filename can have a most extreme of 255 characters. This farthest point does exclude the pathname, so accordingly the whole pathname and filename could very much surpass 255 characters.
The interviewer generally asks this linux interview question and confuse the candidate by further asking if the mentioned length includes pathname. So, get prepared with the complete answer and explain it before the interviewer asks you more.