User forums > Using Code::Blocks

how to display all ASCII Characters in c?

(1/1)

bshi02:
hello.
I stumbled on below youtube video,So I tried to compile and run this code with codeblocks,But it won't display correct ASCII Characters, particularly all Characters which is higher than 127, is totally not visible.
how to display all ASCII Characters in c?
Any reply would be appreciate.
https://www.youtube.com/watch?v=ejZT-bkXqg4&t=23s


#include<stdio.h>

int main()
{
    int count = 0;

    while(count <= 255)
    {
        printf("ASCII value of %c is %d\n\n ", count, count);
        count++;
    }

    return 0;
}

stahta01:
Please read and follow this website rules!

https://forums.codeblocks.org/index.php/topic,9996.0.html

--- Quote ---1. This is NOT a general programming board. "How do I write a program that....", "Can anybody teach me how to", "I have this homework", "My program doesn't run and I don't have the slightest idea of why because I'm a C++ newcomer", "What is a compiler", "What does gcc do" is the kind of questions that is FORBIDDEN to ask.
--- End quote ---

stahta01:
Note: Asking how to use an codepage in Code::Blocks would possibly be within the CB rules.

I have no idea if Linux has codepages. But, windows OS does.
Edit2: Add link https://forums.codeblocks.org/index.php/topic,22168.msg150874.html

Edit: To help you would require information like CB version and Operating system information.

Tim S.

bshi02:
I 'm sorry that it seems I broke the rules,But I think that this problem(to display all ASCII character from 1 to 255) is related to fiddle with any options in codeblocks.
For your infomation,I always have used Codeblocks version 20.03. and My circumstance is windows 10 Home and Setting English Language for non Unicode language..

stahta01:
Read https://forums.codeblocks.org/index.php/topic,22168.msg150874.html it might help.

Navigation

[0] Message Index

Go to full version