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

Improve the bracketed part of the sentence.
He jumped off the train while it (had been running).

A) has been running B) ran
C) was running D) No improvement
 
Answer & Explanation Answer: C) was running

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

0 2325
Q:

Which one of the following is not correct about Sargasso Sea?

A) It is characterized with anticyclonic circulation of ocean currents B) It records the highest salinity in Atlantic Ocean
C) It is located west ofGulf Stream and east of Canary Current D) It confined in gyre of calm and motionless water
 
Answer & Explanation Answer: A) It is characterized with anticyclonic circulation of ocean currents

Explanation:

The calm centre of the anticyclonic gyre in the North Atlantic, comprising a large eddy of surface water, the boundaries of which are demarcated by major current systems such as the Gulf Stream, Canaries Current, and North Atlantic Drift. The Sargasso Sea is a large, warm (18°C), saline, which is characterized by an abundance of floating brown seaweed (Sargassum).

Report Error

View Answer Report Error Discuss

Filed Under: General Awareness
Exam Prep: Bank Exams

1 2324
Q:

Which is a correct way to measure wavelength?

A) Nearest peak to peak B) Nearest peak to nearest trough
C) Nearest trough to peak D) None of the above
 
Answer & Explanation Answer: A) Nearest peak to peak

Explanation:

Wavelength of a wave can be measured with the distance between two nearest crest and crest or nearest troughs. It is measured as armstrong units.

Report Error

View Answer Report Error Discuss

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

2 2324
Q:

Clossing Process Group

What are the Project Management Processes included in Closing Process Group?

Answer


    • Close Project

    • Contract Closure



 

Report Error

View answer Workspace Report Error Discuss

0 2324
Q:

Project Cost Management

What are the Project Management Processes included in the Project Cost Management?

Answer

Cost Estimating - Developing an approximation of the costs of the resources needed to complete  project activities.


Cost Budgeting - Aggregating the estimated costs of individual activities or work packages to establish a cost baseline


Cost Control - Influencing the factors that create cost variances and controlling changes to the project budget.

Report Error

View answer Workspace Report Error Discuss

0 2324
Q:

The playback singer who is certified as the 'Most Recorded Artist' in the world (2009) by the World Records Academy is ________

Answer

Asha Bhosle . She  is the sister of Latha Mangeshkar

Report Error

View answer Workspace Report Error Discuss

0 2324