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

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -