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 2331
Q:

Country With No Income Tax?

A) Kuwait B) Saudi Arabia
C) Qatar D) All of the above
 
Answer & Explanation Answer: D) All of the above

Explanation:

Here all the above given options are the countries with no income tax.

 

List of Countries With No Income Tax:

 

- Qatar

- Oman

- UAE

- Saudi Arabia

- Bahrain

- Kuwait

- Bermuda

- Cayman Islands

- Bahamas

- Monaco.

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

2 2330
Q:

Which planet is known as the Morning Star or the Evening Star?

A) Jupiter B) Venus
C) Mercury D) Saturn
 
Answer & Explanation Answer: B) Venus

Explanation:

Venus planet is known as the Morning Star or the Evening Star.

Report Error

View Answer Report Error Discuss

5 2330
Q:

Which process removes carbon dioxide from the atmosphere?

A) Combustion B) Photosynthesis
C) Respiration D) All of the above
 
Answer & Explanation Answer: B) Photosynthesis

Explanation:

Photosynthesis process removes carbon dioxide from the atmosphere. Green plants remove carbon dioxide from the atmosphere by photosynthesis. 

The level of carbon dioxide in the atmosphere is maintained by several processes, including photosynthesis, respiration and combustion. 

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams
Job Role: Analyst , Bank Clerk , Bank PO

2 2329
Q:

Proteins are made where in the cell

A) Cytoplasm B) Chromosomes
C) Nucleus D) Ribosomes
 
Answer & Explanation Answer: D) Ribosomes

Explanation:

Ribosomes are the sites where proteins are synthesised. The transcription process where the code of the DNA is copied occurs in nucleus but the main process of translating that code to form other protein occurs in ribosomes.

Report Error

View Answer Report Error Discuss

Filed Under: General Science
Exam Prep: AIEEE , Bank Exams , CAT , GATE
Job Role: Analyst , Bank Clerk , Bank PO

6 2329
Q:

The outermost layer of the earth is called

A) Core B) Mantle
C) Crust D) Inner core
 
Answer & Explanation Answer: C) Crust

Explanation:
Report Error

View Answer Report Error Discuss

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

6 2329
Q:

What are the two kinds of Rotatory motion?

A) Spin and Vibrational motion B) Spin and Projectile motion
C) Spin and Orbital motion D) Spin and Translatory motion
 
Answer & Explanation Answer: C) Spin and Orbital motion

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Physics
Exam Prep: Bank Exams

3 2329
Q:

Who is the author of the book ' The Last Word'

Answer

Hanif Qureishi

Report Error

View answer Workspace Report Error Discuss

2 2329