Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9252303
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:54:41+00:00 2026-06-18T10:54:41+00:00

I am looking for a very simple explanation/tutorial on what flags are. I understand

  • 0

I am looking for a very simple explanation/tutorial on what flags are. I understand that flags work indicate a command what to do. For example:

rm -Rf test

I know that the rm command will remove the test folder and that the -Rf flags will force the command to erase not just the folder but the files in it.

But, where are the flags read/compiled??? What handles the flags? Can I, for example, write my own C/C++ program and designate different flags so that the program does different things? I hope I am asking the right questions. If not, please let me know.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T10:54:42+00:00Added an answer on June 18, 2026 at 10:54 am

    This simple program should demonstrate the arguments passed to the program (including the program name itself.)

    Parsing, interpreting and using those arguments is up to the programmer (you), although there are libraries available to help:

    int main(int argc, char* argv[])
    {
        int i;
        for(i=0; i<argc; ++i)
        {   printf("Argument %d : %s\n", i, argv[i]);
        }
        return 0;
    }
    

    If you compile this program into a.out, and run it as:

    prompt$>  ./a.out ParamOne ParamTwo -rf x.c
    

    You should see output:

    Argument 0 : a.out
    Argument 1 : ParamOne
    Argument 2 : ParamTwo
    Argument 3 : -rf
    Argument 4 : x.c
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking for a very simple script that will tell me if one twitter
I am looking for a very simple data grid plugin for jquery that will
I'm looking for a very simple algorithm for computing the polygon intersection/clipping. That is,
I'm looking for a very simple wpf diagram toolset that would allow me to
Short: I am looking for a very simple (configuration/maintenance wise) solution, that would allow
I'm looking to create a very simple program that's only function is to display
I am looking for a very simple example where e.g. there is a two
I am looking for a very simple update tool that can be sent out
I'm looking for a very, very simple php framework that has a simple mysql
I'm looking at creating a very simple HTML page that contains an HTML form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.