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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:49:44+00:00 2026-06-11T16:49:44+00:00

Why would printf(%c , 2293552); print 0 ? ASCII values are from 0 to

  • 0

Why would printf("%c ", 2293552); print 0?

ASCII values are from 0 to 127
I know this must be some cyclic thing but I want a clear explanation. Thank you

  • 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-06-11T16:49:45+00:00Added an answer on June 11, 2026 at 4:49 pm

    The number 2293552 corresponds to 0x22ff30. When printf interprets it as ASCII, it ignores all bits beyond the last eight bits containing 0x30, which is the code for '0'.

    From the C99 standard:

    7.19.1.6.8 — %c: If no l length modifier is present, the int argument is converted to an unsigned char, and the resulting character is written.

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

Sidebar

Related Questions

Why would sizeof in the following cases print different values: printf(%d,sizeof(ab)); //print 3 char*
I need a for loop which would print from year 2000 to 2099. [Bindable]
In CodeIgniter I would do: print_r ($this->db->queries); In Yii I tried: print_r (Yii::app()->db) But
I would like to write a routine like printf, not functionally-wise, but rather I'd
I read about freopen to redirect all printf to a file, but I would
printf(INT_MAX); limits.h is included, for some reason it's not working in this particular project.
I would like to know from where inside a huge application a certain message
printf(%s%d%c, s, a, c); The string would be printed on the stdout; but how
I want to stringify a number and add zero-padding, like how printf(%05d) would add
I would like to use the syntax that printf uses, using the %d, %s

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.