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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:34:18+00:00 2026-05-24T12:34:18+00:00

If I have an integer variable I can use sscanf as shown below by

  • 0

If I have an integer variable I can use sscanf as shown below by using the format specifier %d.

sscanf (line, "Value of integer: %d\n", &my_integer);

Where can I find format specifiers for uint8_t, uint16_t, uint32_t and uint64_t?

uint64_t has probably %lu.

  • 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-24T12:34:19+00:00Added an answer on May 24, 2026 at 12:34 pm

    They are declared in <inttypes.h> as macros: SCNd8, SCNd16, SCNd32 and SCNd64.
    Example (for int32_t):

    sscanf (line, "Value of integer: %" SCNd32 "\n", &my_integer);
    

    Their format is PRI (for printf)/SCN (for scan) then o, u, x, X d, i for the corresponding specifier then nothing, LEAST, FAST, MAX then the size (obviously there is no size for MAX). Some other examples: PRIo8, PRIuMAX, SCNoFAST16.

    Edit: BTW a related question asked why that method was used. You may find the answers interesting.

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

Sidebar

Related Questions

I have an integer variable, that can get a value larger than 4294967295. What
I have a variable of type Hashmap <String,Integer >. In this, the Integer value
I'd like to have an integer variable which can be set to null and
I have a variable that can either be boolean false , or an integer
I have 3 base representations for positive integer numbers: Decimal, in unsigned long variable
I have a string variable, $operation , that can have values like + or
We have some integer arithmetic which for historical reasons has to work the same
I have an integer field in a ClientDataSet and I need to compare to
Let's say I have an integer that I need to convert to a string
I have an NSAttributedString s and an integer i and I'd like a function

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.