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

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

Answer

Hanif Qureishi

Report Error

View answer Workspace Report Error Discuss

2 2379
Q:

The best - paid player in the world playing with Barcelona team

Answer

Lionel Messi

Report Error

View answer Workspace Report Error Discuss

Subject: Sports

2 2379
Q:

Which type of doctor specializes in teeth and jaw alignment?

A) Orthodontist B) Pediatrician
C) Psychiatrist D) Oncologist
 
Answer & Explanation Answer: A) Orthodontist

Explanation:

An orthodontist is the type of doctor that specializes in teeth and jaw alignment. When the teeth don't align properly, it can cause uneven wear in the teeth.

 

The jaw is a hinge joint. Strong muscles in the face open and close the jaw. Teeth are implanted in the jaw and serve to rip, tear and crush food in preparation for swallowing it.

Report Error

View Answer Report Error Discuss

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

2 2379
Q:

Which IIT has launched an exclusive incubator "Fabless Chip Design Incubator"(FabCI) to boost chip design?

A) IIT Kanpur B) IIT Hyderabad
C) IIT Madras D) IIT Mumbai
 
Answer & Explanation Answer: B) IIT Hyderabad

Explanation:

IIT Hyderabad has launched an exclusive incubator "Fabless Chip Design Incubator"(FabCI) to boost chip design.

Report Error

View Answer Report Error Discuss

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

0 2379
Q:

The Cabinet Committee on Economic Affairs (CCEA) has approved expansion of "Beti Bachao Beti Padhao" yojana for a pan India coverage from 2017-2018 to _____.

 

A) 2018-2019 B)  2019-2020
C) 2020-2021 D) 2021-2022
 
Answer & Explanation Answer: B)  2019-2020

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: Indian Politics
Exam Prep: Bank Exams

1 2379
Q:

Function of Bile juice?

Answer

Bile contains bile acids, which are critical for digestion and absorption of fats in the small intestine. Since bile increases the absorption of fats, it is an important part of the absorption of the fat-soluble substances, such as the vitamins A, D, E, and K. Besides its digestive function, many waste products, including bilirubin, a byproduct of red blood cells recycled by the liver are eliminated from the body by secretion into bile and elimination in feces.

Report Error

View answer Workspace Report Error Discuss

Subject: Biology Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 2379
Q:

Deficiency of which minerals causes goiter?

A) Magnesium B) Calcium
C) Iodine D) Sulphur
 
Answer & Explanation Answer: C) Iodine

Explanation:

Deficiency of Iodine cause Goiter also called Enlarged Thyroid. It doesn't give any pain but difficult to swallow and breath are its causes.

Report Error

View Answer Report Error Discuss

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

13 2379