Posts

Showing posts from July, 2015
Linked List Program can we optimize it? how??? // playlist of songs and different operations apply on list #include<stdio.h> #include<conio.h> struct node* reverse_list(struct node *); struct node* create_list(struct node *,int,char *); struct node* insert_node(struct node *,int,int,char *); struct node* del_node(struct node *,int); void display(struct node *); struct node* search(struct node*,char *); char* match(char*,char*); struct node { char **p; struct node *next; }; main() { struct node *head=NULL; char *a="love song";   char *List[8]={"song1 of the list","music of the best","sangeet of hindi",      "listsong of all","sadsong of heart",      "marriage song with boom!!","love song","old song"};   int i,num,position,choice;   clrscr();   for(i=0;i<8;i++)   {    printf("%d\t%s\n",i+1,List[i]);   }
Image
Girl the Half Generation of the World little bit sensitive and little bit more emotional  about the LIFE!! Don't need any make up,  Smile works!! SHE who has power to hypnotize  any man!! Keep Sm!le .....!!! 
Image
Try not a good thing for lazy person!! the world TRY can make a person tired but it can give you a big Happy Smile of Success in your LIFE ...........!!!
Image
Idea!! a big thing to have a change Idea is a big think for me........last many years, i saw the different way of teaching, i saw how to make big number, i saw how to win in competition.......and so many thing....but, it's new for me to learn how to think in LIFE.  i am ready to learn it. Thanks to provide me this chance!!
Image
Give SOMEone ........A Sm!le........ It's Works!! :) have a good day!!!
Can this code be optimized: #include<stdio.h> #include<conio.h> #include<string.h> void delThe(char *); main() {  char a[100];  printf("enter the sentence\n");  gets(a);  delThe(a);  printf("your sentence\n%s",a);  return 0; } void delThe(char *a) {       int i=0,j=0,k,blank=0;       int old_length, new_length,max,l;       char str[]={"0X20"};       k=strlen(str);       printf("%d\n",k);        while(a[i]!='\0')         {           if(a[i]==' ')             blank++;           i++;         }     old_length=i-1;     new_length=old_length+(3*blank);     max=new_length;       for(j=old_length;j>=0;j--,new_length--)         {   if(a[j]==' ')             {                 for(l=k-1;l>=0;l--)                 {                     a[new_length]=str[l];                     new_length--;                 }                  new_l
OPTIMIZE THE FOLLOWING CODE.................. #include<stdio.h> #include<conio.h> void delThe(char []); main() {  char a[50];  printf("enter the sentence\n");  gets(a);  delThe(a);  printf("your sentence\n%s",a);  return 0; } void delThe(char *a) {       int i,j=0,k;       char str[3];       for(i=0;;i++)         {    k=i;              if(a[i]=='\0')             {                 break;             }else             {                 if(a[i]=='t'||a[i]=='T')                 {                    str[0]=a[i];                    str[1]=a[i+1];                    str[2]=a[i+2];                     if(!strcmp(str,"the"))                     {                          while(a[k]!='\0')                          {                           a[k]=a[k+3];                           k++;                          }                          i--;                     }