Showing posts with label anmolviidya. Show all posts

We'd love to hear from you😍 we are always ready for your feedback. You can suggest us something correct our mistakes mak...

We'd love to hear from you😍

anmolviidya/contact us

we are always ready for your feedback.
You can
  • suggest us something
  • correct our mistakes
  • make some business deals
  • appreciate us
📧E-mail : anmolshah.20k@gmail.com😉

                           in case of emergency(click here)😱

📱Mobile no.: 8208371942

👈other social links are provided on the page

C omputer Organization and Architecture : Notes Download Click a file to download. To download multiple files, press Co...

Computer Organization and Architecture : Notes Download


computer organization and architecture


  1. Click a file to download.
  • To download multiple files, press Command (Mac) or Ctrl (Windows) while clicking other files.

  • 2.Right-click and click Download.
Note: You can't drag a file or folder directly to your desktop.


C program for finding the frequency of given word in a string: #include<stdio.h> int main(){     int i=0,k=0,yes=0;     ch...



C program for finding the frequency of given word in a string:

C program : frequency of given word in a string


#include<stdio.h>
int main(){
    int i=0,k=0,yes=0;
    char word[10],str[50];
    printf("Enter string:\t");
    gets(str);
    printf("Enter word\t");
    gets(word);
   while(str[i]!='\0')
   {
       if(word[k]==str[i])
       {
           i++;
           k++;
           if(k==(strlen(word)-1))
           {
               yes++;
               k=0;
           }
       }
       else
        i++;
   }
   printf("%s is repeating %d times",word,yes);
return 0;
}

How to print             1        232      34543    4567654  567898765                                                     H...

How to print 

           1
       232
     34543
   4567654
 567898765
                                                    Here is the simplified source code which will generate the pattern for the entered value of row provided by the user. 

 1         232       34543     4567654   567898765



#include<stdio.h>
int main(){
int n,i,j,k,p;
printf("Enter no of row:\t");
scanf("%d",&n);
for(i=1;i<=n-1;i++)
{
    k=i;
    p=k;
    for(j=1;j<=2*n-1;j++)
    {
        if((j>=n+1-i) && (j<=n-1+i)){
            printf("%d",p);
            if(k<2*i-1){
                k++;
                p=k;
            }
            else{
                p--;
            }
           
        }
        else
            printf(" ");
    }
    printf("\n");
}
return 0;
}

output will look like: