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:

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

We set out for the gallows. Two warders marched on either side of the prisoner, with their rifles at the slope; two others marched close against him, gripping him by his arm and shoulder, as though, at once pushing and supporting him. The rest of us, magistrates and the like, followed behind. Suddenly, when we had gone ten yards, the procession stopped short without any order or warning. A dreadful thing had happened ­ a dog, come goodness knows whence, had appeared in the yard. It came bounding among us with a loud volley of barks, and leapt round us wagging its whole body, wild with glee at finding so many human beings together. It was a large woolly dog, half Airedale, half Pariah. For a moment, it pranced round us, and then, before anyone could stop it, it had made a dash for the prisoner, and jumping up tried to lick his face. Everyone stood aghast, too taken aback even to grab at the dog.

What was surprising about the actions of the dog?

A) It ran up and down the path B) It bit the guards
C) It barked at the magistrates D) It licked the prisoner's face
 
Answer & Explanation Answer: D) It licked the prisoner's face

Explanation:
Report Error

View Answer Report Error Discuss

Filed Under: English
Exam Prep: Bank Exams

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

What is the Focus of an Earthquake?

Answer

A Focus of an earthquake is the location where the earthquake begins. The ground ruptures at this spot, then seismic waves radiate outward in all directions.

At this focus point, the release of energy due to faulting actually occurs during an earthquake. The point directly above the focus on the surface is called Epicenter.


The focus is also called as Hypocenter as it is the synonym of the focus.

Report Error

View answer Workspace Report Error Discuss

Subject: General Awareness Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO , IT Trainer

3 2379
Q:

Which city is the venue of the 9th International Conference on Micro Irrigation ?

A) Aurangabad B) Ahmedabad
C) Allahabad D) None of the above
 
Answer & Explanation Answer: A) Aurangabad

Explanation:
Report Error

View Answer Report Error Discuss

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

1 2379
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:

In Frankenstein, Victor changes from an optimistic, eager young man to one who is anxious and

A) Remorseful B) Confident
C) Honest D) Coward
 
Answer & Explanation Answer: A) Remorseful

Explanation:

Frankenstein is an English Novel by Mary Shelley. In Frankenstein, Victor is a character who changes from an optimistic, eager young man to one who is anxious and Remorseful.

Report Error

View Answer Report Error Discuss

Filed Under: Books and Authors
Exam Prep: AIEEE , Bank Exams , CAT
Job Role: Analyst , Bank Clerk , Bank PO

2 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 2378