Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

signed vs unsigned char #27

Open
sreemoorthy opened this issue Feb 20, 2024 · 1 comment
Open

signed vs unsigned char #27

sreemoorthy opened this issue Feb 20, 2024 · 1 comment

Comments

@sreemoorthy
Copy link

if Char is used for representing ASCII symbols, what is the significance of having a signed and unsigned 'char'?. does a signed and unsigned char point to a different symbol or the same symbol?. if they both represent the same symbol why the extra keyword usage?

@streetdogg
Copy link
Contributor

if Char is used for representing ASCII symbols, what is the significance of having a signed and unsigned 'char'?

char is used to save the number associated with a character as per the ASCII table.

does a signed and unsigned char point to a different symbol or the same symbol?.

  1. only positive numbers point to a symbol. The ASCII table has only 128 entries - https://www.cs.cmu.edu/~pattis/15-1XX/common/handouts/ascii.html
  2. The negative numbers don't represent any symbol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants