include<stdio.h>
void view_buffer(void);
char virt_disp[25][80],a[5]={0x7C,0x12,0x11,0x12,0x7C},bit,byte,name[20],
b[5]={0x7C,0x12,0x11,0x12,0x7C},
c[5]={0x7C,0x12,0x11,0x12,0x7C},
d[5]={0x7C,0x12,0x11,0x12,0x7C},
e[5]={0x7C,0x12,0x11,0x12,0x7C};
int i,j,k,l;
void main()
{
for(i=0;i<25;i++)
for(j=0;j<80;j++)
virt_disp[i][j]=45;
printf("Enter a letter\n");
scanf("%s",name);
for(i=0;i<5;i++)
for(j=0;j<7;j++)
{
switch(name[0])
{
case 'a':
if(a[i]>>j&1)
virt_disp[j][i]=255;
break;
case 'b':
if(b[i]>>j&1)
virt_disp[j][i]=255;
break;
case 'c':
if(c[i]>>j&1)
virt_disp[j][i]=255;
break;
case 'd':
if(d[i]>>j&1)
virt_disp[j][i]=255;
break;
case 'e':
if(e[i]>>j&1)
virt_disp[j][i]=255;
break;
}
}
view_buffer();
}
void view_buffer()
{
for(i=0;i<25;i++)
{
for(j=0;j<80;j++)
printf("%c",virt_disp[i][j]);
printf("\n");
}
}