C - Write program to use putchar to output char type variables

Requirements

Use putchar(), not printf(), is to generate output.

Demo

#include <stdio.h>

int main()/* w  w w  .ja  v  a 2  s  .  c o  m*/
{
    char a,b,c,d;

    a = 'W';
    b = 'o';
    c = 'w';
    d = '\n';
    putchar(a);
    putchar(b);
    putchar(c);
    putchar(d);
    return(0);
}

Result

Related Exercise