C - Write program to assign character constant literal to char type variables

Requirements

Write program to assign character constant literal to char type variables

Demo

#include <stdio.h>

int main()/*from ww w .  ja  va2 s.com*/
{
    char a,b,c,d;

    a = 'W';
    b = 'o';
    c = 'w';
    d = '\n';
    printf("%c%c%c%c",a,b,c,d);
    return(0);
}

Result

Related Exercise