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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:45:42+00:00 2026-06-12T06:45:42+00:00

From definition double strtod ( const char * str, char ** endptr ); C

  • 0

From definition double strtod ( const char * str, char ** endptr );

C reference sites provide an example for that mighty function:

char szOrbits[] = "365.24 29.53";
char * pEnd;
double d1, d2;
d1 = strtod (szOrbits,&pEnd);
d2 = strtod (pEnd,NULL);

If endptr should be of type char ** why is char *pEnd used here ? And not char **pEnd ?

  • 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-12T06:45:44+00:00Added an answer on June 12, 2026 at 6:45 am

    The type of pEnd is char *. The type of &pEnd is char **.

    C passes arguments to functions by value, so to modify a pointer you need to pass a pointer to the pointer.

    You could define a char ** directly but you would need to initialize it to a char * as the idea is that strtod is modifying a char *.

    Like:

    char *q;
    char **p = &q;
    
    d1 = strtod (szOrbits, p);
    

    Obviously the intermediate p pointer is not necessary and you can use &q directly.

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

Sidebar

Related Questions

In the database, I have a definition table that is read from the application
I am working with a COM plugin interface that has the following function definition:
Really need just some guidance : Topological sort by arcs definition (from my question)
I couldn't find anything about this in MySQL documentation. SELECT accesion_id, definition FROM accesion_table
here's a definition of marshaling from Wikipedia: In computer science, marshalling (similar to serialization)
I have a class written in C++ that uses also some definitions from cuda_runtime.h,
From the Scala API , I got the following example, which does not compile;
What is this double-colon :: ? E.g. Foo::Bar . I found a definition :
// MyClass.h namespace MyNamespace { static const double GasConstant = 1.987; class MyClass {
I'm trying to redefine two member functions from their parent's definition. I don't know

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.