please xplain the output of following program....

Code:
#include<iostream.h>
#include<conio.h>
#include<string.h>

void main(){
	char a[10];
	char b[10];
	char c[10];
	cin>>c;
	cin>>b;
	strcpy(a,c);
	cout<<a<<endl;
	strcat(b,c);
	cout<<b<<endl;
	cout<<a<<endl;
	int x=strcmp(a,c);
	cout<<x;
}
please xplain the output of the above program...

kaushal
swapnil
kaushal
swapnilkaushal
shal
8

Last edited by shabbir; 17Jul2009 at 09:34.. Reason: Code blocks