123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
16 million color generation in C (Mini Project)

--------------------------------------------------------------------------------

Description : The biggest limitation of C language is that it supports only 16 colors. This has been removed through VESA programming. I have designed my own graphic library functions and not used any standard graphics library function. Most of the functions are written in assembly language (8086) to improve the speed. The project opens standard 24-bit color (16 million ) BMP image successfully


Code :
#include<stdio.h>
#include<conio.h>
#include<alloc.h>
#include<dos.h>

#define bk 0
#define fg 65535
#define fc 0
#define bc 255
#define w 255


struct bmfh //bmp file header
{
long filesize;
long reserved;
long offset;
};

struct bmih //information header
{
long size;
long width;
long height;
int planes;
int bitsperpixel;
long compression;
long imagesize;
long horres;
long verres;
long colorused;
long important;
} ;


union REGS i,o;

//////////////////structure needed to get vesamodeinfo///////////////////

struct modeinfo
{
unsigned short modeattrib;
unsigned char unused1[10];
void (far *switchbank)();
unsigned char unused2[240];
};

void (far *switchbank)();
int bank;
unsigned int *image;
unsigned char *image1;

/////////////////////vesa compatible check/////////////////////

int getvesainfo()
{
unsigned char vesainfo[256];
asm mov ax,04f00h;
asm les di, vesainfo;
asm int 10h;
asm cmp al,4fh;
asm jz done;
return 0;
done :
return 1;
}


/////////////////////////get vesa mode information//////////////////

int getvesamodeinfo(int mode,struct modeinfo far *m)
{
asm mov ax,04f01h;
asm mov cx,mode;
asm les di,m;
asm int 10h;
return (m->modeattrib & 1);
}

///////////////////////setting the vesa mode////////////////////////

void setvesamode(int mode)
{
asm mov ax,04f02h;
asm mov bx,mode;
asm int 10h;
}

/////plotting a pixel in 16-bit mode by calculating pixel address////////////

void pixel(int x,int y,unsigned int col)
{
int off;
asm mov ax,1600
asm mov bx,y
asm mul bx
asm add ax,x
asm jnc noc1
asm inc dx

noc1:
asm add ax,x
asm jnc noc
asm inc dx
noc:
asm mov off,ax
asm cmp dx,bank
asm jz same
asm mov bank,dx
asm xor bx,bx

switchbank();


same:
asm push di
asm mov ax,0a000h
asm mov es,ax
asm mov di,off
asm mov ax,col
asm mov [es:di],ax
asm pop di

}

////////////plotting a pixel in 24-bit color mode//////////////////

void pixel1(int x,int y,unsigned char b,unsigned char g,unsigned char r)
{
int off;
asm mov ax,1920
asm mov bx,y
asm mul bx
asm add ax,x
asm jnc noc
asm inc dx

noc:
asm add ax,x
asm jnc noc1
asm inc dx

noc1:
asm add ax,x
asm jnc noc2
asm inc dx

noc2:
asm mov off,ax
asm cmp dx,bank
asm jz same
asm mov bank,dx
asm xor bx,bx

switchbank();

same:

asm push di
asm mov ax,0a000h
asm mov es,ax
asm mov di,off

asm mov al,b
asm mov [es:di],al
asm inc di

asm mov al,g
asm mov [es:di],al
asm inc di

asm mov al,r
asm mov [es:di],al

asm pop di

}

/////////////////////for setting video mode/////////////////

void setmode(int mode)
{
asm mov ax,mode
asm int 10h;
}


void main()
{
struct modeinfo mi;
int x,y,button,px,py;
int xoff=0,yoff=0;
unsigned int col;
char key,str1[5],str2[5];
unsigned int color=0;
unsigned char b,g,r;


if(!getvesamodeinfo(0x112,&mi))
{
printf("Mode Not Supported");
getch();
exit(2);
}

switchbank=mi.switchbank;

setvesamode(0x112);

initmouse();
setmousepos(0,0);
restrictmouseptr(0,0,625,465);
px=0;
py=0;

// highsaveimage(0,0,16,16);
// mouseptr(0,0);

truebar(0,0,639,15,136,14,1);
truebar(0,16,639,479,192,192,192);
line3din(0,30,639,30);
box3din(5,35,635,475,128,128,128);

bmpopen(7,38,"c:\p1.bmp");

// box3dout(20,50,620,70,192,192,192);
// print(30,55,"the quick brown fox jumps over the lazy little dog
0123456789");

truesaveimage(0,0,16,16);
mouse1(0,0);


while(!kbhit())
{
getmousepos(&button,&x,&y);

if(button&1==1)
{
truebar(300,10,420,20,128,128,0);
color1(x,y,&b,&g,&r);
itoa(b,str1,10);
print(300,10,str1);
itoa(g,str1,10);
print(340,10,str1);
itoa(r,str1,10);
print(380,10,str1);
}

if(x!=px||y!=py)
{
//highrestoreimage(px,py);
//highsaveimage(x,y,x+15,y+15);
truerestoreimage(px,py);
truesaveimage(x,y,x+15,y+15);

itoa(x,str1,10);
itoa(y,str2,10);
truebar(50,100,110,110,35,34,234);
print(50,100,str1);
print(80,100,str2);

//mouseptr(x,y);

mouse1(x,y);
px=x;
py=y;
}
}

getch();
setmode(3);
}

////////////read the color value at pixel(x,y) in 16-bit mode///////////////

unsigned int color(int x,int y)
{
unsigned int col;

int off;
asm mov ax,1600
asm mov bx,y
asm mul bx
asm add ax,x
asm jnc noc1
asm inc dx

noc1:
asm add ax,x
asm jnc noc
asm inc dx
noc:
asm mov off,ax
asm cmp dx,bank
asm jz same
asm mov bank,dx
asm xor bx,bx

switchbank();


same:
asm push di
asm mov ax,0a000h
asm mov es,ax
asm mov di,off
asm mov ax,[es:di]
asm mov col,ax
asm pop di


return col;
}

//////read the b,g,r color value at a pixel(x,y) in true mode ////////////

color1(int x,int y,unsigned char *b,unsigned char *g,unsigned char *r)
{
int off;
unsigned char b1,g1,r1;

asm mov ax,1920
asm mov bx,y
asm mul bx
asm add ax,x
asm jnc noc
asm inc dx

noc:
asm add ax,x
asm jnc noc1
asm inc dx

noc1:
asm add ax,x
asm jnc noc2
asm inc dx

noc2:
asm mov off,ax
asm cmp dx,bank
asm jz same
asm mov bank,dx
asm xor bx,bx

switchbank();

same:

asm push di
asm mov ax,0a000h
asm mov es,ax
asm mov di,off

asm mov al,[es:di]
asm mov b1,al
*b=b1;
asm inc di

asm mov al,[es:di]
asm mov g1,al
*g=g1;
asm inc di


asm mov al,[es:di]
asm mov r1,al
*r=r1;
asm pop di

}

///////////save a screen area in high color mode/////////////////

highsaveimage(int x1,int y1,int x2,int y2)
{
int i,j,k;
int size;
int height,width;

height=y2-y1;
width=x2-x1;

size=((height+1)*(width+1)*2) + 4;
image=(unsigned int *)malloc(size);
*(image+0)=height;
*(image+1)=width;

k=2;

for(i=y1;i<=y2;i++)
{
for(j=x1;j<=x2;j++)
{
*(image+k)=color(j,i);
k++;
}
}
}


//////////////////save an area in true color mode///////////////////

truesaveimage(int x1,int y1,int x2,int y2)
{
int i,j,k;
int size;
int height,width;
unsigned char b,g,r;
unsigned char hh,lh,hw,lw;

height=y2-y1;
width=x2-x1;

size=((height+1)*(width+1)*3) + 4;
image1=(unsigned char *)malloc(size);


lh=(height<<8)>>8;
hh=height>>8;

lw=(width<<8)>>8;
hw=width>>8;

*(image1+0)=hh;
*(image1+1)=lh;
*(image1+2)=hw;
*(image1+3)=lw;

k=4;

for(i=y1;i<=y2;i++)
{
for(j=x1;j<=x2;j++)
{
color1(j,i,&b,&g,&r);
*(image1+k)=b;
k++;
*(image1+k)=g;
k++;
*(image1+k)=r;
k++;
}
}
}

////////to restore an image back to screen in high color mode///////////

highrestoreimage(int x,int y)
{
int i,j,k;
int height,width;

height = *(image+0);
width = *(image+1);

k=2;
for(j=y;j<=y+height;j++)
{
for(i=x;i<=x+width;i++)
{
pixel(i,j,*(image+k));
k++;
}
}
free(image);
}

/////////////////to restore an image in true color mode////////////////

truerestoreimage(int x,int y)
{
int i,j,k;
int height,width;
unsigned char r,g,b;

height = *(image1+0);
height=height<<8;
height=height|*(image1+1);

width = *(image1+2);
width=width<<8;
width=width|*(image1+3);

k=4;
for(j=y;j<=y+height;j++)
{
for(i=x;i<=x+width;i++)
{
b=*(image1+k);
k++;
g=*(image1+k);
k++;
r=*(image1+k);
k++;
pixel1(i,j,b,g,r);
}
}
free(image1);
}


//////////////////to initialize the mouse//////////////////
initmouse()
{
i.x.ax=0;
int86(0x33,&i,&o);
return(o.x.ax);
}

//////////////////set the mouse cursor position/////////////

setmousepos(int x,int y)
{
i.x.ax=4;
i.x.cx=x;
i.x.dx=y;
int86(0x33,&i,&o);
}

getmousepos(int *button,int *x,int *y)
{
i.x.ax=3;
int86(0x33,&i,&o);
*button=o.x.bx;
*x=o.x.cx;
*y=o.x.dx;
}

restrictmouseptr(int x1,int y1,int x2,int y2)
{
i.x.ax=7;
i.x.cx=x1;
i.x.dx=x2;
int86(0x33,&i,&o);
i.x.ax=8;
i.x.cx=y1;
i.x.dx=y2;
int86(0x33,&i,&o);
}

between(int a,int b,int c,int d)
{
char ch = 'n';
int i,j,button,x,y;

getmousepos(&button,&x,&y);

if(x>=a && x<=c && y>=b && y<=d)
ch='y';
return(ch);
}

//////////////mouse pointer bitmap in high color mode/////////////////

mouseptr(int x,int y)
{

unsigned int mouse[16][16]={

1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
1, 0, w, 0, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,

};

int i;
int j,x1,y1;

x1=x;
y1=y;

for(j=0;j<=15;j++)
{
for(i=0;i<=15;i++)
{
if(mouse[j][i]!=1)
pixel(x1,y1,mouse[j][i]);
x1++;
}
x1=x;
y1++;
}

}

mouse1(int x,int y)
{
unsigned char mouse[16][16] = {

1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, w, w, 0, 1, 1, 1, 1, 1, 1, 1,
1, 0, w, w, w, w, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
1, 0, w, 0, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 0, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 0, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 0, w, 0, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1,



};


int i;
int j,x1,y1;
unsigned char b,g,r;

x1=x;
y1=y;

for(j=0;j<=15;j++)
{
for(i=0;i<=15;i++)
{
if(mouse[j][i]!=1)
{
b=g=r=mouse[j][i];
pixel1(x1,y1,b,g,r);
}
x1++;
}
x1=x;
y1++;
}
}



///////////////draws a rectangular bar in high color mode///////////////////

highbar(int x1,int y1,int x2,int y2,unsigned int color)
{
int i,j;
for(j=y1;j<=y2;j++)
{
for(i=x1;i<=x2;i++)
{
pixel(i,j,color);
}
}
}


truebar(int x1,int y1,int x2,int y2,unsigned char b,unsigned char g,unsigned char r)
{
int i,j;
for(j=y1;j<=y2;j++)
{
for(i=x1;i<=x2;i++)
{
pixel1(i,j,b,g,r);
}
}
}


////////////////////////to print a character////////////////////////

highdisplay(int x,int y,int k)
{
int i,j,x1;
unsigned int smalltext[36][10][8] = {
{
bk,bk,bk,bk,bk,bk,bk,bk, ///a///
bk,bk,bk,bk,bk,bk,bk,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,fg,fg,
bk,bk,bk,bk,bk,bk,bk,bk
},


{
fg,fg,bk,bk,bk,bk,bk,bk, ///b///
bk,fg,bk,bk,bk,bk,bk,bk,
bk,fg,bk,bk,bk,bk,bk,bk,
bk,fg,fg,fg,fg,fg,bk,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
fg,bk,fg,fg,fg,fg,bk,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},

{
bk,bk,bk,bk,bk,bk,bk,bk, ///c///
bk,bk,bk,bk,bk,bk,bk,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,bk,bk,
bk,fg,bk,bk,bk,bk,bk,bk,
bk,fg,bk,bk,bk,bk,bk,bk,
bk,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,fg,bk,bk,fg,bk,
fg,bk,bk,fg,bk,bk,fg,bk,
bk,fg,fg,bk,fg,fg,bk,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},


{
bk,bk,bk,bk,bk,bk,bk,bk, ///x///
bk,bk,bk,bk,bk,bk,bk,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,fg,bk,bk,fg,fg,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,bk,bk,fg,fg,bk,bk,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,fg,fg,bk,bk,fg,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},



{
bk,fg,bk,bk,bk,bk,fg,bk, ///y///
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,fg,bk,
bk,bk,bk,bk,bk,bk,fg,bk,
bk,bk,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},


{
bk,bk,bk,bk,bk,bk,bk,bk, ///z///
bk,bk,bk,bk,bk,bk,bk,bk,
bk,fg,fg,fg,fg,fg,fg,bk,
bk,bk,bk,bk,bk,fg,bk,bk,
bk,bk,bk,bk,fg,bk,bk,bk,
bk,bk,bk,fg,bk,bk,bk,bk,
bk,bk,fg,bk,bk,bk,bk,bk,
bk,fg,bk,bk,bk,bk,bk,bk,
bk,fg,fg,fg,fg,fg,fg,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},


};

x1=x;
for(i=0;i<=9;i++)
{
for(j=0;j<=7;j++)
{
if(smalltext[k][i][j]!=bk)
pixel(x,y,smalltext[k][i][j]);
x++;
}
x=x1;
y++;
}
}



/////////////////small alphabet set for true color mode/////////////////

truedisplay(int x,int y,int k)
{
int i,j,x1;
unsigned char smalltext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,fc,bc,
bc,bc,bc,bc,bc,bc,bc,bc
},



{
bc,fc,bc,bc,bc,bc,fc,bc, ///y///
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,bc,fc,fc,fc,fc,fc,bc,
bc,bc,bc,bc,bc,bc,fc,bc,
bc,bc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,bc,fc,fc,fc,fc,bc,bc,
bc,bc,bc,bc,bc,bc,bc,bc
},


{
bc,bc,bc,bc,bc,bc,bc,bc, ///z///
bc,bc,bc,bc,bc,bc,bc,bc,
bc,fc,fc,fc,fc,fc,fc,bc,
bc,bc,bc,bc,bc,fc,bc,bc,
bc,bc,bc,bc,fc,bc,bc,bc,
bc,bc,bc,fc,bc,bc,bc,bc,
bc,bc,fc,bc,bc,bc,bc,bc,
bc,fc,bc,bc,bc,bc,bc,bc,
bc,fc,fc,fc,fc,fc,fc,bc,
bc,bc,bc,bc,bc,bc,bc,bc
},


};

x1=x;
for(i=0;i<=9;i++)
{
for(j=0;j<=7;j++)
{
if(smalltext[k][i][j]!=bc)

pixel1(x,y,smalltext[k][i][j],smalltext[k][i][j],smalltext[k][i][j]);
x++;
}
x=x1;
y++;
}
}



highdisplay1(int x,int y,int k)
{
int i,j,x1;

unsigned int num[10][10][8]={
{
bk,bk,fg,fg,fg,fg,bk,bk, ///0///
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},

{
bk,bk,bk,fg,bk,bk,bk,bk, ///1///
bk,bk,fg,fg,bk,bk,bk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bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,fg,bk,
bk,bk,bk,bk,bk,bk,fg,bk,
bk,bk,bk,bk,bk,bk,fg,bk,
bk,fg,bk,bk,bk,bk,fg,bk,
bk,bk,fg,fg,fg,fg,bk,bk,
bk,bk,bk,bk,bk,bk,bk,bk
},

};

x1=x;
for(i=0;i<=9;i++)
{
for(j=0;j<=7;j++)
{
if(num[k][i][j]!=bk)
pixel(x,y,num[k][i][j]);
x++;
}
x=x1;
y++;
}

}

//////////////////numeric set in true color mode///////////////////////

truedisplay1(int x,int y,int k)
{
int i,j,x1;

unsigned char num[10][10][8]={
{
bc,bc,fc,fc,fc,fc,bc,bc, ///0///
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,fc,bc,bc,bc,bc,fc,bc,
bc,bc,fc,fc,fc,fc,bc,bc,
bc,bc,bc,bc,bc,bc,bc,bc
},

{
bc,bc,bc,fc,bc,bc,bc,bc, ///1///
bc,bc,fc,fc,bc,bc,bc,bc,
bc,fc,bc,fc,bc,bc,bc,bc,
bc,bc,bc,fc,bc,bc,bc,bc,
bc,bc,bc,fc,bc,bc,bc,bc,
bc,bc,bc,fc,bc,bc,bc,bc,
bc,bc,bc,fc,bc,bc,bc,bc,
bc,bc,bc,fc,bc,bc,bc,bc,
bc,fc,fc,fc,fc,fc,bc,bc,
bc,bc,bc,bc,bc,bc,bc,bc
},


{
bc,bc,fc,fc,fc,fc,bc,bc, ///2///
bc,fc,bc,bc,bc,bc,fc,bc,
bc,bc,bc,bc,bc,bc,fc,bc,
bc,bc,bc,bc,bc,fc,bc,bc,
bc,bc,bc,bc,fc,bc,bc,bc,
bc,bc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)
{
int ascii;

while(*str!='
 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG