Print Extended ASCII in ANSI C

Discussion in 'C Programming' started by ramif, Dec 1, 2007.

  1. ramif

    Guest711202

    Joined:
    Nov 21, 2014
    Messages:
    1
    Likes Received:
    0
    The warning issued by the compiler is quite natural as the for loop you have made is unending.
    unsigned char can take values upto 0 to 255. Now when you add 1 to this, it takes up some negative value and since that negative value is always less than 255, you get a glitch. What I suggest is, print upto 254 and then, outside the for loop print ASCII character 255.
    Hope this helps!
     
    Guest711202, Nov 21, 2014
    #21
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.