Either yelling is unacceptable or the interviewer has done something terribly wrong. If for instance the interviewer has asked for a bribe of some sortor physically assaulted the interviewee, it maymay be acceptable to yell on yourthe way out.
Otherwise, one should thank the interviewer for their time and depart in a calm and dignified manner. Being insulted by the questions being too basic and then yelling on the way out, sounds a lot like a smoke screen for incompetence.
Now, too many basic questions would be another matter, asking for FizzBuzz would be fine, asking for a Fizz program, and then a Buzz program? That might cause some to leave, because it’s basically the same question, even Fizz followed by FizzBuzz might drive some away. Covering a range, making sure the candidate knows the basics and the intermediate stuff as well as the more advanced stuff, certainly, but a focus on the basic stuff is probably going to be taken as bad interviewing or that the position is looking for someone less experienced. Either way, a mark against the company. But the candidate should depart without raising a ruckus.