• Skip to main content
  • Skip to footer

SoftwareProg.com

Software programming learning aide

  • Blog
    • Discussion
  • News
  • CS50’s Introduction to Computer Science by Harvard University on Edx
    • Week 1
    • Week 2
    • Week 3
    • Week 4
    • Week 5

Seeking help of structure of argc and argv in Caesar project

CS50 threads to aide as a supplementary resource › Forums › CS50’s Introduction to Computer Science by Harvard University on Edx › Week 2 › Seeking help of structure of argc and argv in Caesar project

Tagged: Caesar project, command line interface in c

  • This topic is empty.
Log In Register Lost Password
Viewing 1 post (of 1 total)
  • Author
    Posts
  • February 3, 2022 at 6:11 am #187
    admin
    Keymaster

      To my little understanding, there are 3 arguments to be entered through command line interface by the user.

      • ./caesar will be first argument.

      • key will be second.

      • Entered text by user will be third.

      Now, above three are translated into argv as follow:

      • argv[0] will be ./casear (taken care by default and so not needed to code inside main body).

      • argv[1] will be for key.

      • argv[2] will be for entered text

      First, I need to ensure if I am correct in my approach. If so, then to relate argv[1], argv[2] inside the main body, manipulate from string to integer type…

      To my little understanding, there are 3 arguments to be entered through command line interface by the user.

      • ./caesar will be first argument.

      • key will be second.

      • Entered text by user will be third.

      Now, above three are translated into argv as follow:

      • argv[0] will be ./casear (taken care by default and so not needed to code inside main body).

      • argv[1] will be for key.

      • argv[2] will be for entered text

      First, I need to ensure if I am correct in my approach. If so, then to relate argv[1], argv[2] inside the main body, manipulate from string to integer type…

      To my little understanding, there are 3 arguments to be entered through command line interface by the user.

      • ./caesar will be first argument.

      • key will be second.

      • Entered text by user will be third.

      Now, above three are translated into argv as follow:

      • argv[0] will be ./casear (taken care by default and so not needed to code inside main body).

      • argv[1] will be for key.

      • argv[2] will be for entered text

      First, I need to ensure if I am correct in my approach. If so, then to relate argv[1], argv[2] inside the main body, manipulate from string to integer type…

       


      Reply


      https://edstem.org/us/courses/176/discussion/1083632?comment=2474412[learn_press_profile]

    • Author
      Posts
    Log In Register Lost Password
    Viewing 1 post (of 1 total)
    • You must be logged in to reply to this topic.
    Log In

    Log in / Register

    Initiative by Digital Splendid OPC Pvt. Ltd.