-
removing duplicate words from a string
{geshibot language="c"}int main() { char arr[1000]; char *temp=NULL; char *temp1=malloc(100); int len; printf("enter the string: "); gets(arr); len=strlen(arr); puts(arr); printf("len:%d ",len); temp=strtok(arr," "); if(temp!=NULL) strcpy(temp1,temp); while(temp!=NULL) { temp=strtok(NULL," "); if(strstr(temp1,temp)==NULL) { strcat(temp1," "); strcat(temp1,temp); } } strcpy(arr,temp1); printf("arr:%s",arr); return...
-
How to launch 5 diff application from 5 child process
Create a 5 child process from a common parent and launch different applications from the children processes....