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

  • SEARCH
  • Home
  • 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 8215421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:46:52+00:00 2026-06-07T11:46:52+00:00

Recently a student in a CS lab I TA was ranting about how confusing

  • 0

Recently a student in a CS lab I TA was ranting about how confusing it was that argv[0] was not the first argument but the command you ran instead (kind of like when they rant about how “stupid” it is that they have to write x == 2 or x == 4 instead of x == 2 or 4 in python), and asked me why they did it. Well, I honestly had no idea why. I don’t see any practical purpose to knowing what command was used to execute your program nor a problem with passing an empty list/vector, and google didn’t help to resolve this question either.

So my question is why is the executed command itself included in the list/vector of command line arguments?

  • 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-07T11:46:55+00:00Added an answer on June 7, 2026 at 11:46 am

    Knowing the command line can influence the way the program behaves. As a famous example, bash behaves like the classic sh if you call it as such (for example using a softlink). Busybox also comes to mind (it really makes heavy use of it).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently pointed a student doing work experience to an article about dumping a
Recently I've noticed that on occasion I do not get a mayorship notification when
Recently,I am handling a solution for WebPart internationalization,but I am not familiar with the
I have recently created a student organization website (i.e. www-sc.xxx.edu/studentorganizations/ourorganization). Our college does not
I work at a college that uses an intranet based student management solution not
Recently I found about this tool easy_install that help me to easy install additional
I'm a programming student in my first C++ class, and recently we were given
I'm a programming student in my first C++ class, and recently we covered linked
I'm a programming student in my first C++ class, and recently we were encouraged
recently I am reading about Thinking in Java. that code in my PC is

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.