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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T22:17:46+00:00 2026-05-31T22:17:46+00:00

When I simply print the query I get: one=1&two=2&three=3&four=3&five=3&six=3 Still not working!!!! I am

  • 0

When I simply print the query I get:

one=1&two=2&three=3&four=3&five=3&six=3

Still not working!!!! I am about to go nuts.

#include <stdio.h>
#include <stdlib.h>

int main(void){

    char *data;
    float prices[] = {1, 2, 3, 4, 5, 6};
    int a, b, c, d, e, f;

    printf("%s%c%c\n",
    "Content-Type:text/html;charset=iso-8859-1",13,10);

    printf("<title>Bill</title>\n");
    printf("<h3 align=center >Bill</h3>\n");

    data = getenv("QUERY_STRING");

    if(data == NULL){
            printf("<p>Error!</p>");
    } else {
    printf("%s", data);
    sscanf(data, "one=%d&two=%d&three=%d&four=%d&five=%d&six=%d", &a, &b, &c, &d, &e,       &f);
    }

return 0;

}
  • 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-05-31T22:17:47+00:00Added an answer on May 31, 2026 at 10:17 pm

    An easy way to parse this string is using sscanf. For this example:

    one=2&two=1
    

    you could use:

    int one, two;
    sscanf(data, "one=%d&two=%d", &one, &two);
    

    More information about sscanf here: http://www.cplusplus.com/reference/clibrary/cstdio/sscanf/

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

Sidebar

Related Questions

I'm going to get a headache from this one. I have a simple query
I have a generic Print method that iterates over a list and simply prints
I expect there's one of two answers to this, either impossible or extremely simple
I need a query that will have the date, a user's name, and one
I hope my question will be clear and perfect enough to not get down
I'm working on integrating some data from a 3rd-Party system into one of my
lets get straight to my problem, the code I have written here does not
hey guys, i'm working on a very simple breadcrumb-path solution, however i have one
I'm trying to run jetty without building the whole project, but simply point jetty
I'd like to print a simple table in my page with 3 columns, building

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.