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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:47:06+00:00 2026-05-13T22:47:06+00:00

I can’t use long long; what should I be using?

  • 0

I can’t use “long long”; what should I be using?

  • 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-13T22:47:07+00:00Added an answer on May 13, 2026 at 10:47 pm

    Assuming Snow Leopard (Mac OS X 10.6.2 – Intel), then ‘long’ is 64-bits with the default compiler.

    Specify ‘g++ -m64’ and it will likely be 64-bits on earlier versions too.

     1 = sizeof(char)
     1 = sizeof(unsigned char)
     2 = sizeof(short)
     2 = sizeof(unsigned short)
     4 = sizeof(int)
     4 = sizeof(unsigned int)
     8 = sizeof(long)
     8 = sizeof(unsigned long)
     4 = sizeof(float)
     8 = sizeof(double)
    16 = sizeof(long double)
     8 = sizeof(size_t)
     8 = sizeof(ptrdiff_t)
     8 = sizeof(time_t)
     8 = sizeof(void *)
     8 = sizeof(char *)
     8 = sizeof(short *)
     8 = sizeof(int *)
     8 = sizeof(long *)
     8 = sizeof(float *)
     8 = sizeof(double *)
     8 = sizeof(int (*)(void))
     8 = sizeof(double (*)(void))
     8 = sizeof(char *(*)(void))
    

    Tested with:

    i686-apple-darwin10-g++-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5646) (dot 1)
    Copyright (C) 2007 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

    Compiling with GCC 4.7.1 on Mac OS X 10.7.5 with option -std=c99, the output from the program is more extensive. Thanks to apalopohapa for pointing out the oversight that long long etc were missing from the original.

     1 = sizeof(char)
     1 = sizeof(unsigned char)
     2 = sizeof(short)
     2 = sizeof(unsigned short)
     4 = sizeof(int)
     4 = sizeof(unsigned int)
     8 = sizeof(long)
     8 = sizeof(unsigned long)
     4 = sizeof(float)
     8 = sizeof(double)
    16 = sizeof(long double)
     8 = sizeof(size_t)
     8 = sizeof(ptrdiff_t)
     8 = sizeof(time_t)
     8 = sizeof(long long)
     8 = sizeof(unsigned long long)
     8 = sizeof(uintmax_t)
     1 = sizeof(int8_t)
     2 = sizeof(int16_t)
     4 = sizeof(int32_t)
     8 = sizeof(int64_t)
     1 = sizeof(int_least8_t)
     2 = sizeof(int_least16_t)
     4 = sizeof(int_least32_t)
     8 = sizeof(int_least64_t)
     1 = sizeof(int_fast8_t)
     2 = sizeof(int_fast16_t)
     4 = sizeof(int_fast32_t)
     8 = sizeof(int_fast64_t)
     8 = sizeof(uintptr_t)
     8 = sizeof(void *)
     8 = sizeof(char *)
     8 = sizeof(short *)
     8 = sizeof(int *)
     8 = sizeof(long *)
     8 = sizeof(float *)
     8 = sizeof(double *)
     8 = sizeof(int (*)(void))
     8 = sizeof(double (*)(void))
     8 = sizeof(char *(*)(void))
     1 = sizeof(struct { char a; })
     2 = sizeof(struct { short a; })
     4 = sizeof(struct { int a; })
     8 = sizeof(struct { long a; })
     4 = sizeof(struct { float a; })
     8 = sizeof(struct { double a; })
    16 = sizeof(struct { char a; double b; })
    16 = sizeof(struct { short a; double b; })
    16 = sizeof(struct { long a; double b; })
     4 = sizeof(struct { char a; char b; short c; })
    16 = sizeof(struct { char a; char b; long c; })
     4 = sizeof(struct { short a; short b; })
     6 = sizeof(struct { char a[3]; char b[3]; })
     8 = sizeof(struct { char a[3]; char b[3]; short c; })
    16 = sizeof(struct { long double a; })
    32 = sizeof(struct { char a; long double b; })
    16 = sizeof(struct { char a; long long b; })
    16 = sizeof(struct { char a; uintmax_t b; })
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can I authenticate with just Google account username and password instead of using OAuth?
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can PHP PDO extension bind nested objects automatically ? I mean using foreign key
Can anybody help me? What should be the datatype for this type -07:00:00 of
Can someone guide me on a possible solution? I don't want to use /bin/cp
Can anyone explain me what's going on? I use this method - (BOOL)shouldAutorotateToInterfaceOrientation:( UIInterfaceOrientation)interfaceOrientation
Can we use the asterisk character * for a search action in SQL database?
Can we close all known/unknown connections to database with the code? I'm using Access
Can I convert a pdf to pcl file with ghostscript? I'm using Ghostscript 9.01
can you recommend some good ASP.NET tutorials or a good book? Should I jump

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.