Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

How to input all char in printf

+7 votes
asked Nov 9, 2022 by COLIN CALILUNG (190 points)

1 Answer

0 votes
answered Nov 10, 2022 by Peter Minarik (86,040 points)

printf() prints on the standard output (console).

scanf() reads from the standard output (console).

What exactly are you after?

Printing all the characters from the ASCII table:

    for (int i = 0; i < 256; i++)
        printf("%c", i);

Reading any character (to be exact reading a character string):

    char buffer[256];
    scanf("%s", buffer);
    printf("String read: %s\n", buffer);

Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.
...