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()/* w ww. j  av a2s  .  c o m*/
{
    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