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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:44:29+00:00 2026-06-11T16:44:29+00:00

Im new to c and could use some help. I am trying to output

  • 0

Im new to c and could use some help.

I am trying to output a text file using the fputs command, however I need to input a complete string to the fputs function which i dont have. I have about 6 arrays and I want to put the [i] th entry of each array into the string that is used in the fputs function.

There is one arry of characters and multiple arrays of ints and floats.

at the moment i have my various arrays and i am trying to make all of the [i]th into one array which i can send to the fputs function

eg the string I need has : {array1[i] array2[i] array3[i] etc…}

Any help would be greatly appreciated.

EDIT: clarity

complier errors:
assignment from incompatible pointer types
passing argument one of fputs from incompatible pointer type.

  • 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-11T16:44:30+00:00Added an answer on June 11, 2026 at 4:44 pm

    You are looking for sprintf().

    char buf[256];
    sprintf (buffer, "%d %d %d", array1[i], array2[i], array3[i]);
    

    If you have too many array[], you can use a for loop then use strcpy and strcatto make the final buf which you can use in fputs.

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

Sidebar

Related Questions

I'm new to sqlalchemy and could use some help. I'm trying to write a
I am really new to Ruby and could use some help with a program.
I'm new to SQL and could use some help in creating a database schema
I could really use some help here. I just created a new bare repo
I could use some help writing a SQL query. I'm trying to display some
Could use some help. I am utterly stuck, been trying to fix this one
I'm new to vbscript and Stack Overflow, and could really use some help. Currently
I am pretty new to php and could sure use some help understanding how
I could use a bit of help with this, as i am new to
I'am new to Python 3 and could really use a little help. I have

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.