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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T15:54:40+00:00 2026-06-01T15:54:40+00:00

I have been reading from the book The C Programming Language learning C, and

  • 0

I have been reading from the book “The C Programming Language” learning C, and I stumbled upon the arithmetic s[i] - '0' which they said that it gives the numeric value of the character stored in s[i]. I didn’t quite understand it, how could it give the value by subtraction?
Note This is used in the atoi function, which converts a string of digits into its numeric equivalent.
Thanks

  • 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. Editorial Team
    Editorial Team
    2026-06-01T15:54:41+00:00Added an answer on June 1, 2026 at 3:54 pm

    Basically, what you need to understand is that on a modern computer, all information is stored digitally as a sequence of bytes. It’s up to each program to decide how to interpret each byte. So a character is nothing but one or more bytes – a numerical value which usually represents a human-readable letter or symbol. For example, in ASCII, the letter ‘A’ is represented by the numerical value 65.

    What this means is that in certain programming languages, such as C, you can treat characters as numerical values. For example, in C the expression 'A' + 1 would give you 66, which happens to be the ASCII value for B (assuming your compiler/platform is using an ASCII-compatible character set).

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

Sidebar

Related Questions

I have been reading about bit operators in Objective-C in Kochan's book, Programming in
I have a strange issue from a client in that our code, which they
So I have begun learning OpenGL, reading from the book OpenGL Super Bible 5
I have been reading the book SQL Antipatterns: Avoiding the Pitfalls of Database Programming
I've been reading about getattr() function in dive into python. From that book I
I previously have been reading NMEA data from a GPS via a serial port
Currently, I have been reading lists of data from a binary data file programmatically
What I have been able to grasp from reading the source and documentation from
i have been reading this interesting article which is increasing my every growing confusion
I've been reading Accelerated C++ and I have to say it's an interesting book.

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.