Advertisement
paulogp

Código numérico de um caracter

Jul 13th, 2011
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1. // Apple Xcode
  2.  
  3. #include <stdio.h>
  4.  
  5. int main (int argc, const char * argv[])
  6. {
  7.     /* codigo numerico de um caracter */
  8.     char the_char;
  9.  
  10.     printf("char: ");
  11.     scanf("%c", &the_char);
  12.     printf("%c -> %d\n", the_char, (int)the_char);
  13.  
  14.     return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement