Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

how to write and run code in command prompt

+3 votes
asked Feb 16 by Enugala Manideepu Reddy (150 points) 1 flag

2 Answers

0 votes
answered Feb 17 by Peter Minarik (19,180 points)

What exactly do you mean by "command prompt"?

Do you refer to Windows Command Prompt?

Have a look at these:

Or Linux shell, e.g. Bash?

You can look at these:

Something else? Please, specify.

0 votes
answered 3 days ago by Tech Treat (140 points)
First you have to save your code in a document, Then go to command prompt type the code cd (folder name) next you have type your compiler code along with your document name. Then use ./a.out code

For example,

I created a language folder. In that, I created program.c document which has code in it, Now I have to go to command prompt and type cd language code.

if I am using gcc compiler, I have to enter gcc program.c

if there is no errors, It get compiled. Then i have to enter ./a.out code to execute the program
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...