What is the benefit of running code on terminal?

okay so im new in programming and i am starting with c . i have installed vs code and i have some confusion.

why do some people run their code in output and some in terminal. what is the benefit of running codes in terminal or output?

im completely beginner so kindly answer me thank you.

So, beneath the surface, both are actually running code “in terminal” but I assume your question is about “why do some people have their results show up in the Terminal tab and some people have their results show up in the Output tab of VSCode” in which case the answer is probably because they are using different methods of running the code. You can run your code using tools like Code Runner which will launch it one way and others that will launch it directly in the terminal (or even just bringing up the terminal directly).

As to the advantages of running directly in the terminal, one is better control over exactly what code is being executed and options can be added for running that code (for example, passing command line flags or enabling debug logging, etc). Usually, when developing we are going to use a “run” or “test” button depending on what we are doing. In courses like these we often see command line applications (ie. the code is meant to be run at the terminal, getting input from and sending output to that terminal) being developed which are somewhat unique because most code is not written for the command line. The reason courses like to do this is because it removes additional dependencies on things like a UI.