Questions

Q:

Write a program for matrix multiplication in c

Answer

#include <stdio.h>


int main() {


  int a[5][5], b[5][5], c[5][5], i, j, k, sum = 0, m, n, o, p;


  printf( "\nEnter the row and column of first matrix" );


  scanf( "%d %d", &m, &n );


  printf( "\nEnter the row and column of second matrix" );


  scanf( "%d %d", &o, &p );


  if(n!=o) {


      printf( "Matrix mutiplication is not possible" );


      printf( "\nColumn of first matrix must be same as row of second matrix" );


  }


  else {


      printf( "\nEnter the First matrix" );


      for( i=0; i<m; i++ )


      for( j=0; j<n; j++ )


           scanf( "%d", &a[i][j] );


      printf( "\nEnter the Second matrix" );


      for( i=0; i<o; i++ )


      for( j=0; j<p; j++ )


           scanf( "%d", &b[i][j] );


      printf( "\nThe First matrix is\n" );


      for( i=0; i<m; i++ ) {


      printf("\n");


      for( j=0; j<n; j++ ) {


           printf( "%d\t", a[i][j] );


      }


      }


      printf( "\nThe Second matrix is\n" );


      for( i=0; i<o; i++ ) {


      printf("\n");


      for( j=0; j<p; j++ ) {


           printf( "%d\t", b[i][j] );


      }       


      }


      for( i=0; i<m; i++ )


      for( j=0; j<p;j++ )


           c[i][j] = 0;


      for( i=0; i<m; i++ ) { //row of first matrix


      for( j=0; j<p; j++ )  {  //column of second matrix


           sum = 0;


           for( k=0; k<n; k++ )


               sum = sum + a[i][k]*b[k][j];


           c[i][j] = sum;


      }


      }


  }


  printf( "\nThe multiplication of two matrix is\n" );


  for( i=0; i<m; i++ ) {


      printf("\n");


      for( j=0; j<p; j++ ) {


           printf( "%d\t", c[i][j] );


      }


  }


  return 0;


}

Report Error

View answer Workspace Report Error Discuss

Subject: Programming

0 2378
Q:

What has feet and legs and nothing else?

Answer

Stocking is long sock that women wore which has legs and feet and nothing else.

Report Error

View answer Workspace Report Error Discuss

Subject: Word Puzzles Exam Prep: GRE , Bank Exams , AIEEE
Job Role: Bank PO , Bank Clerk , Analyst

1 2377
Q:

Where do arteries carry blood?

A) Heart B) Lungs
C) Tissues D) Brain
 
Answer & Explanation Answer: A) Heart

Explanation:

Arteries carry oxygenated blood away from the heart to the tissues, except for pulmonary arteries, which carry blood to the lungs for oxygenation (usually veins carry deoxygenated blood to the heart but the pulmonary veins carry oxygenated blood as well).

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk

4 2377
Q:

Gametes are produced by the process of

A) Mitosis B) Meiosis
C) Both A & B D) None of the above
 
Answer & Explanation Answer: B) Meiosis

Explanation:

A gametes are haploid cells as they have only one set of chromosomes. Meiosis is a process of cellular reproduction in which both male and female gametes are formed. During meiosis, the DNA is only replicated or copied one time.

Gametes_are_produced_by_the_process_of1560944987.png image

Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: AIEEE
Job Role: Analyst

3 2377
Q:

Which among the following is/are female hormones?
(i) Estrogen
(ii) Progesterone
(iii) Testosterone

A) (i) and (iii) B) (i) and (ii)
C) (ii) and (iii) D) Only (iii)
 
Answer & Explanation Answer: B) (i) and (ii)

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Biology
Exam Prep: Bank Exams

5 2376
Q:

India’s who has won the girl's title in the IBSF World Under-16 Snooker Championships 2018?

A) Keerthana Pandian B) Sangeeta Chanu
C) Kumar Mangalan D) Thangjam Tababi Devi
 
Answer & Explanation Answer: A) Keerthana Pandian

Explanation:

India's Keerthana Pandian has won the girls’ title in the IBSF World Under-16 Snooker Championships.

 

In the final in St Petersburg, Russia, Keerthana outclassed her Belarussian rival Albina Leschuk 3-1.

Report Error

View Answer Report Error Discuss

Filed Under: Sports
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2376
Q:

Instrument for measuring light intensity is called

A) Lucimeter B) Cryometer
C) Cyanometer D) Barometer
 
Answer & Explanation Answer: A) Lucimeter

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: Bank Exams

0 2376
Q:

Read the passage carefully and choose the best answer to each question out of the four alternatives and click the button corresponding to it.


Crude mineral oil comes out of the earth as a thick brown or black liquid with a strong smell. It is a complex mixture of many different substances, each with its own individual qualities. Most of them are combinations of hydrogen and carbon in varying proportions. Such hydrocarbons are also found in other forms such as bitumen, asphalt and natural gas. Mineral oil originates from the carcasses of tiny animals and from plants that live in the sea. Over million of years, these dead creatures form large deposits under sea­bed and ocean currents cover them with a blanket of sand and silt. As this material hardens, it becomes sedimentary rock and effectively shuts out the oxygen, thus preventing the complete decomposition of the marine deposits underneath. The layers of sedimentary rocks become thicker, and heavier. Their pressure produces heat, which transforms the tiny carcasses into crude oil in a process that is still going on today.


The time taken for the marine deposits to harden into rocks is

A) a few centuries B) millions of years
C) a few decades D) thousands of years
 
Answer & Explanation Answer: B) millions of years

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2376