PUTCHAR()

this is used to output a single character to the standard output. it takes a character as an argument and prints it to the console

#include <stdio.h>

int main() {
    char ch;

    // Read a character from the user
    printf("Enter a character: ");
    ch = getchar();  // Read one character 
                     // Give Input As a

    // Output the character using putchar
    printf("You entered: ");
    putchar(ch);  // Output the entered character

    return 0;
}

Last updated