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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:27:56+00:00 2026-05-22T23:27:56+00:00

If an API expects a 64 bit type, how can I check that a

  • 0
  1. If an API expects a 64 bit type, how can I check that a ctypes type has that many bits if sizeof returns the number of bytes?
  2. How do I know how many bits are in each byte on the current platform?
  3. Where is CHAR_BIT defined in Python?
  • 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-22T23:27:57+00:00Added an answer on May 22, 2026 at 11:27 pm

    C/C++ function signatures are written with C/C++ types, like “int” or “double” or “uint32_t”. All of these have corresponding ctypes equivalents, so normally you do not care about the number of bits.

    That said…

    import os
    print os.sysconf('SC_CHAR_BIT')
    

    …is about as close as you will get, I think. Does not work on non-Unix platforms. And as tMC points out in the comments, it does not even work on all Unix platforms; I believe it is a GNU extension.

    [update]

    Actually, the POSIX spec appears to mandate CHAR_BIT == 8. So on any system that supports the SC_CHAR_BIT sysconf selector, you do not actually need it :-).

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

Sidebar

Related Questions

If i have a function api that expects a 14 digit input and returns
I have an API that expects/accepts in the body XML and can return json
I use an API that expects a SQL string. I take a user input,
I'm using a Python API that expects me to pass it a function. However,
Some API returns me XmlCursor pointing on root of XML Document. I need to
Windows API ::FindWindow function fails when called from Service application. GetLastError() also returns 0
What API or tools can I use to query the capabilities of the system
Using the Windows API, how can I get a list of domains on my
So NTFS uses a 128-bit Guid to identify files and directories, you can view
I am using an API that works with images and one of the methods

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.