Lernen C Programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gift1234
    New Member
    • Apr 2007
    • 1

    Lernen C Programming

    hallo,

    please i need help with a C programming code that prints the letters A to Z in capital with their ASCII codes in hexedecimal e.g. A = 0x41, B = 0x42 e.t.c. and a corresponding code that gets a decimal number and prints the number and its binary equivalent.e.g 3 = 00000011.

    Thanks .
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by Gift1234
    hallo,

    please i need help with a C programming code that prints the letters A to Z in capital with their ASCII codes in hexedecimal e.g. A = 0x41, B = 0x42 e.t.c. and a corresponding code that gets a decimal number and prints the number and its binary equivalent.e.g 3 = 00000011.

    Thanks .
    Have a look at the %c, %x, %d format specifiers in printf's format string.
    For the binary representation have a look at the itoa() function.

    kind regards,

    Jos

    Comment

    Working...