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

  • Home
  • SEARCH
  • 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 6662659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T02:24:48+00:00 2026-05-26T02:24:48+00:00

Is there an explicitly defined limit on the size of numbers a compiler can

  • 0

Is there an explicitly defined limit on the size of numbers a compiler can handle when multiplying out constants?

#define val1 1000000000000000
#define val2 <some really really big number>

std::cerr << val1 * val2 << std::endl;

Would this generate an error due to numeric limits in c++ given a sufficiently large value for val2? Where/how is that limit defined if so?

  • 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-26T02:24:49+00:00Added an answer on May 26, 2026 at 2:24 am

    It would be treat as an integer and so the maximum integer (defined in limits.h) would apply

    If you want a large number use 1000…….0000L to define it as a long.

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

Sidebar

Related Questions

I'm using the CPoint class from MFC. There is no explicitly defined assignment operator
Is there any way to load an installed activity that isn't explicitly defined in
There's obviously something wrong with my build, but I can't figure it out. I
There are always a few attribute values that Android doesn't explicitly define how to
Is there any easy way to explicitly make an already threaded application utilise a
is there a method for svn to explicitly create the cached name/password settings for
Why is there a need to explicitly call GridView.DataBind() to render the gridview. Why
I have a table where I haven't explicitly defined a primary key, it's not
Suppose there are two entities EntityA and EntityB. Two tables are defined for both
In C#, why are there no compilation errors when the same user-defined conversion exists

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.