Ya got it DaWei thanks a lot

Code:
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
int main()
{
 int fd1,fd2,nread;
char buf[1024],
char *string= "User-Name = \"";
char *string1,*IMSI="eapsim";

        string1 = malloc (strlen (string)+strlen( IMSI)+1);
        strcat (string1,string);
        strcat (string1,IMSI);
        strcat (string1,"\"");
        strcat (string1,"\n");
 
       write (1,string1,strlen(string1));
return 0;
}

Last edited by shabbir; 17Sep2007 at 20:28.. Reason: Code block