int main() { int fd,wr; char ch[]=”Emblogic”; char *name; name = malloc(sizeof(char)*233); if(name==NULL) { perror(“Malloc”); } fd=open(“file.txt”,O_WRONLY); printf(“File descripter =%d\n”,fd); wr = write(fd,ch,7); if(wr == -1) { perror(“write”); } printf(“wr =%d\n”,wr); sprintf(name,”%d”,fd); printf(“%s\n”,name); execl(“fd1″,”fd1″,name,0); printf(“Bye\n”); }
string is not compare with separate word but i am not using string by character.
Assignment1 is completed and assignment 2 remaining only 6 question
create a make file using 2header file & 3.c file & successfully run the RCS