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()/*from   w ww.j a  v  a  2 s  .com*/
{
    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