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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:54:02+00:00 2026-05-10T18:54:02+00:00

in a C program I have an long* that I want to serialize (thus

  • 0

in a C program I have an long* that I want to serialize (thus converting to chars). A long doesn’t fit in a single char, and the size varies depending of the processor (can be 4 bytes or 8 bytes).

Theres a good way to make the serialization and de-serialization?

  • 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. 2026-05-10T18:54:03+00:00Added an answer on May 10, 2026 at 6:54 pm
    long * longs;  // ...  int numChars = numLongs * sizeof(long); char* longsAsChars = (char*) longs; char* chars = malloc(numChars); memcpy(chars, longsAsChars, numChars); 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that performs a long-time computations, so I want to speed
I have a fully-functional Java program that's fairly long, and I want to transfer
I have a long running program, my_prog that has some output that I want
I Have a program written in VB6 that reads a long text file and
I have a program, that takes a long time to load. Because of this,
I have to build a C# program that makes CSV files and puts long
I have a long-running program on a remote machine and want to be sure
I got a long running program that I don't want to kill, but I
I have program that runs for long periods of time and I'd like to
all. Let's say I have a program that contains a long list of C

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.