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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:33:44+00:00 2026-05-31T02:33:44+00:00

I need to run a program that will have a similar output both on

  • 0

I need to run a program that will have a similar output both on Linux and visual studio.

Linux’s default width of the exponent field is 2 and visual studio’s is 3.

So for a number 3.40282e+38 Linux leaves it as it is, but visual studio pads it with an additional 0, 3.40282e+038

Anyone know how to configure the output in visual studio to remove the zero? (or add a zero in Linux)

  • 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-31T02:33:45+00:00Added an answer on May 31, 2026 at 2:33 am

    According to Wikipedia: http://en.wikipedia.org/wiki/Printf_format_string

    The exponent always contains at least two digits; if the value is
    zero, the exponent is 00. In Windows, the exponent contains three
    digits by default, e.g. 1.5e002, but this can be altered by
    Microsoft-specific _set_output_format function.

    So it looks like you can ask Microsoft’s compiler not to add the zero. I don’t know about asking gcc to add the zero, though.

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

Sidebar

Related Questions

I have a legacy program that I need to run with the extension of
I have a program that I need to run under *nix and windows. because
I am writing a program that needs to run a java.jar server. I need
i need run code that will create a database and populate tables. i am
I need to run a script and have access to the default stdin (terminal
I need to write a C program that will allow me to read/write files
I have an interactive program that runs stdin and stdout. I need to create
I have a program that needs to run a function M times per iteration,
I need to write a program that will take a existing local windows user,
I am creating a program that will run an experiment on a user. It

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.