Showing the numeric values of characters

Tuesday, October 14, 2014
/* Showing the numeric values of characters 0403 */

#include <stdio.h>
main()
{
    char c1;
    char c2;

    c1 = 'A';
    c2 = 'a';
    printf("Convert the value of c1 to character: %c.\n", c1);
    printf("Convert the value of c2 to character: %c.\n", c2);

    printf("The numeric value of A is: %d.\n", c1);
    printf("The numeric value of A is: %d.\n", c2);

    return 0;
}

Copyright @ 2015 Tron!

Labels

Blog Archive