help needed

Discussion in 'C' started by yogesh joshi, Aug 4, 2010.

  1. yogesh joshi

    yogesh joshi New Member

    Joined:
    Aug 4, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    help me guys plz as fast you can

    write a program to find products of two metrics in c

    write a program to arrange metrics in ascending order with the help of function

    write a program to count characters, vowels,blankspaces, lines, words and numbers in c

    write a program to find whether string is palindome or not in c
     
  2. ksrao

    ksrao New Member

    Joined:
    Aug 10, 2010
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    0
    Dear i will answer your question

    1. Matrix Multiplication

    Code:
    # include <stdio.h>
    # include <conio.h>
    void main (void)
       
        {
        int A[3][3],B[3,3],C[3][3];
       clrscr();
       printf(" Read matrix A \n");
         for (i=1;i<=3;i++)
           for(j=1;j<=3;j++)
             scanf("%d"&A[i][j]);
    
      printf(" Read matrix B \n");
         for (i=1;i<=3;i++)
           for(j=1;j<=3;j++)
             scanf("%d"&B[i][j]);
    
      for(i=1;i<3;i++)
        for(j=1;j<3;j++)
          {
            for(k=1;k<j;k++)
            C[i][j]=C[i]+A[i][k] * B[K][J];
          }
        printf(" The product of A&B  matrix is C \n");
         for (i=1;i<=3;i++)
            {
                   for(j=1;j<=3;j++)
                   printf("%d"C[i][j]); 
                   printf('/n');
           }
      getch();
      }

    For further questions please refer programming ANSI C.

    Kolla Sanjeeva Rao
     
  3. yogesh joshi

    yogesh joshi New Member

    Joined:
    Aug 4, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    thnx bro is there any gratitude system i want to gratitude u
    and one more thing tell me another answer's also plzzzzzzz
     
  4. ksrao

    ksrao New Member

    Joined:
    Aug 10, 2010
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    0
    Dear i will answer your second question also
    Dont worry

    in the first program i have forgotten to declare i,j,k as int in declaration section do it.

    2. To find out the given String is palindrome or Not.
    Code:
       # include <stdio.h>
       # include <conio.h>
       # include <string.h>
    
        void main(void)
         {
          clrscr();
          char st[20];
          int i,l,s,mid;
          printf(" Enter the string \n");
          gets(st);
         l=strlen(st);
         mid=l/2;
         for(i=0;i<=mid;i++)
             if (st[i]!=st[l-1])
             goto XX;
             else
             l=l-1;
             printf("the given string is palindrome \n");
             goto YY;
          XX:printf("The given string is not palindrome\n");
         YY:;
         getch();
       }
    
    Regards
    Kolla. Sanjeeva Rao

    For further queries in C refer ANSCI C-Programming by BalaguruSwamy
     
  5. yogesh joshi

    yogesh joshi New Member

    Joined:
    Aug 4, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    hey thnx again but another i want another two also plz help
     
  6. ksrao

    ksrao New Member

    Joined:
    Aug 10, 2010
    Messages:
    11
    Likes Received:
    1
    Trophy Points:
    0
    hi,
    Joshi

    You can find these questions answers in programming in ANSIC C by BalaGuruswamy and go through some online-tests

    Kolla Sanjeeva Rao.
     
  7. vishnupriya

    vishnupriya New Member

    Joined:
    Aug 14, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i want to know about array
     
  8. vishnupriya

    vishnupriya New Member

    Joined:
    Aug 14, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i want simple expalnations about array,functions,strings,structure with syntax please
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice