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.

Run Program Through Command Line

+1 vote
asked May 11, 2020 by Bobberooni Tooni (220 points)
In this online compiler, what command would I have to enter to make code such as below run?
#include <stdio.h>
#include <stdlib.h>

main(int argc, char *argv[]) {
    if(argc<=1) {
        printf("You did not feed me arguments, I will die now :( ...");
     }  //otherwise continue on our merry way....
     int arg1 = atoi(argv[1]);  //argv[0] is the program name
                                //atoi = ascii to int
     //Lets get a-crackin!

1 Answer

+1 vote
answered May 12, 2020 by LiOS (6,420 points)
You can give additional command line arguments at the bottom of the compiler
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.