Write in C DESCRIPTION Create a program that will have 4 threads. In.docx

This preview shows page 1 - 3 out of 3 pages.

Image of page 1

Subscribe to view the full document.

Write in C DESCRIPTION Create a program that will have 4 threads. In your program, the thread ids should be "thl", "th2" "th3", and "th4". The function associated with "th1" should be named "creatematrices" and will get some input parameters to create two nXn matrices. Call these matrices A and B respectively Matrix C will be the product of A and B. That is C A x B. The function associated with "th2" should be named "multiplytop" and will calculate the top n/2 rows of matric C. The function associated with "th3" should be named "multiplybottom" and will calculate the bottom n/2 rows of matrix C. The function associated with "th4" should be named "printresults" and will print the elements of C starting with row "0" and ending with row "n-1". As each row is printed, it should be numbered "row 0", "row 1'", etc; each row should be printed on a separate line; and its elements
Image of page 2
Image of page 3
  • Fall '19

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes