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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T19:47:20+00:00 2026-05-10T19:47:20+00:00

Correct me if I am wrong, int is 4 bytes, with a range of

  • 0

Correct me if I am wrong,

int is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31)
long is 4 bytes, with a range of values from -2,147,483,648 to 2,147,483,647 (2^31)

What is the difference in C++? Can they be used interchangeably?

  • 1 1 Answer
  • 1 View
  • 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-10T19:47:20+00:00Added an answer on May 10, 2026 at 7:47 pm

    It is implementation dependent.

    For example, under Windows they are the same, but for example on Alpha systems a long was 64 bits whereas an int was 32 bits. This article covers the rules for the Intel C++ compiler on variable platforms. To summarize:

      OS           arch           size Windows       IA-32        4 bytes Windows       Intel 64     4 bytes Windows       IA-64        4 bytes Linux         IA-32        4 bytes Linux         Intel 64     8 bytes Linux         IA-64        8 bytes Mac OS X      IA-32        4 bytes Mac OS X      Intel 64     8 bytes   
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use range hader, but not create correct file. if I send Range bytes=0-8999
Correct me if I'm wrong, but a build is a compile, and not every
Someone please correct me if I'm wrong, but parsing a yyyy/MM/dd (or other specific
Please feel free to correct me if I am wrong at any point... I
I'm by no means a sysadmin so please correct me if I'm wrong. I
I have an application in which HttpRuntime.AppDomainAppPath returns the correct path with the wrong
I'm calling this linear class relationship , but correct me if I'm wrong. I'm
Am I correct in assuming that the only difference between "windows files" and "unix
What is the correct way to import a C++ class from a DLL? We're
I'm using Marshal.Copy() to copy the pixel information from a Bitmap to an int[]

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.