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 run the program with arguments

+5 votes
asked Jun 5, 2023 by dogus yuksel (170 points)
Can I start my program with args? Like;

./myprogram --helloarg "hello"

1 Answer

+1 vote
answered Jun 8, 2023 by Peter Minarik (86,640 points)
edited Jun 8, 2023 by Peter Minarik

You can do this via the "Command Line Arguments" option in the "input" window just below the main code editing area. Make sure the output (console) is closed, hit ENTER if needed.

See the image below.

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.
...