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 7910339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:50:02+00:00 2026-06-03T12:50:02+00:00

The program I am working is passed 3 command line arguments, all of which

  • 0

The program I am working is passed 3 command line arguments, all of which should be integers. the skeleton program that was provided has:

int main(char *argv[]){
...
}

What I have done the provided is just try to set an integer to the item in each position of the array (0, 1, & 2), but it won’t compile since its trying to convert a char to an integer. I’m sure there is an easy fix for this, but I can’t seem to figure it out.

  • 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-03T12:50:03+00:00Added an answer on June 3, 2026 at 12:50 pm

    Since this looks like homework, I’ll give you several of hints:

    • Signature of main() includes an int argument, conventionally named argc
    • The initial argument is argv[1], not argv[0]
    • atoi is the easiest way to convert a string to an integer.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Windows Program: How to snoop on command line arguments? I am working
I have the misfortune of working with a program which requires all filenames passed
I'm having trouble with my program crashing. I get that Program.exe has stopped working
I am working on a program that includes a selection of code which is
I have a working program in C++ that generates data for a Mandelbrot Set.
I am working on a program (learning C#) that creates a object (Card) and
I have a FileSystemWatch program that I'm working on and if there's an error
The short program below is intended to iterate over argv passed from the command
I'm working with a method that causes side effects on a passed reference parameter.
I'm working on a .NET program that executes arbitrary scripts against a database. When

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.