Help Me On ARRAY

Discussion in 'C' started by inspiration, Mar 26, 2010.

  1. inspiration

    inspiration New Member

    Joined:
    Feb 15, 2010
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    0
    please can someone help me to do this, i am new at c and have been trying to write this code all day and have gotten no where :(( the program is supposed to be written in C

    create 2 matrices [4][4] and b[4][4] each matrix must be filled with random integers from 0 to 10 using rand function. add matrices a and b and put results in matrix c. calculate values of determinants a,b,and c and display them as well as values of a,b and c on the screen. do not use indexes pointers only
     
  2. pankaj.sea

    pankaj.sea New Member

    Joined:
    Apr 6, 2009
    Messages:
    461
    Likes Received:
    13
    Trophy Points:
    0
    Occupation:
    Web Developer
    Location:
    Kolkata
    Home Page:
    http://ipankaj.net
    First declare your matrices. You've actually got half the declaration in your question. It might also help to write the code first using indexes to work out the logic.

    Another hint. If you access the first dimension of a two dimensional int array, you get a pointer to an int.

    int a[2][2];
    int *p = a[0];

    Are you taking a class? Do you have a textbook to refer to? If so, there should be some examples in it.

    Also, if you don't understand the problem, you can't write the program. Ask your instructor to clarify.
     
  3. inspiration

    inspiration New Member

    Joined:
    Feb 15, 2010
    Messages:
    85
    Likes Received:
    0
    Trophy Points:
    0

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