c - How does ASCII value work internally? -


please use code reference telling how giving ascii output

int main() {  char c; printf("enter character: "); scanf("%c",&c); /* takes character user */  printf("ascii value of %c = %d",c,c);  return 0; } 

the line

printf("ascii value of %c = %d",c,c); 

will show value of c in 2 ways. firstly character, secondly number.

whether or not ascii value, depends on c is, because ascii standard not encompass all of 256 values representable char or unsigned char. depends on system settings such code page, language, etc. moreover, not of ascii characters printable - terminal or console outputs use printable representation of number rather using control - although 7 might ring bell!


Comments

Popular posts from this blog

node.js - How to mock a third-party api calls in the backend -

node.js - Why do I get "SOCKS connection failed. Connection not allowed by ruleset" for some .onion sites? -

matlab - 0-by-1 sym - What do I need to change in order to get proper symbolic results? -