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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T10:43:11+00:00 2026-06-08T10:43:11+00:00

I am trying to split the following, I need to split it by the

  • 0

I am trying to split the following, I need to split it by the function strtok and i wanna obtain the value 1.2597, take note that Down is a dynamic word which can be change. I understand in this case i can use white space as my delimiter, and get the value [1] which is the currency, but how do i go around with it.

CCY 1.2597 Down 0.0021(0.16%) 14:32 SGT [44]

  • 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-08T10:43:12+00:00Added an answer on June 8, 2026 at 10:43 am

    This should do it:

    char *first = strtok(string, ' ');
    char *second = strtok(0, ' ');
    

    If you want to convert the number to a float or double you could also use sscanf:

    char tmp[5];
    float number;
    sscanf(string, "%s %f", tmp, &number);
    

    Or just use sscanf on the number token that you got with strtok.

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

Sidebar

Related Questions

I am trying to split apart various HTML documents based on the following rules:
For an assignment, I'm trying to split a phone number in the following format:
Trying to split this string 主楼怎么走 into separate characters (I need an array) using
I'm trying to port the following php functionality over to perl: public function loadKey($mod,
I am received the following error while trying to implement a C# extension function
I'm trying to split the following string primarily based on whitespace. Please refer to
I'm trying to split the following text: <word>test</word><word>test2</word> etc via the following reg ex:
I am trying to take my Haskell project and split it apart into a
I'm trying to get a block of code down to one line. I need
I am trying to work out how to split the following hexadecimal string into

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.