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

What are the different job scheduling in operating systems?

Answer

Scheduling is the activity of the deciding when process will receive the resources they request.


FCS ---> FCSFS stands for First Come First Served. In FCFS the job that has been waiting the longest is served next.


Round Robin Scheduling--->Round Robin scheduling is a scheduling method where each process gets a small quantity of time to run and then it is preempted and the next process gets to run. This is called time-sharing and gives the effect of all the processes running at the same time


Shortest Job First ---> The Shortest job First scheduling algorithm is a nonpreemptive scheduling algorithm that chooses the job that will execute the shortest amount of time.


Priority Scheduling--->Priority scheduling is a scheduling method where at all times the highest priority process is assigned the resource.

Report Error

View answer Workspace Report Error Discuss

0 2320
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 2320
Q:

Blood group compatibility for marriage?

Answer

Matching blood group before marriage is important. This is to prevent Rh incompatibility. Rh incompatibility can lead to erythroblastosis fetalis (Hemolytic disease of the newborn-HDN). Fetal RBC gets destroyed & newborn may get severe anaemia, jaundice. This jaundice is more severe than Physiological jaundice ( which is the most common and will usually resolve on its own).


 


In very severe form, a fetus may die due to heart failure. This is mediated by the antigen-antibodies reaction. Transfer of maternal antibodies across the placenta occurs. This happens when Rh +ve man marries Rh-ve lady.


  


So Rh +ve man should try to avoid marrying Rh-ve lady.


 


Matching blood groups for marriage ::


Boy : A = Girl : A & AB 


Boy : B = Girl : B & AB 


Boy : O = Girl : O, A, B & AB 


Boy : AB = Girl : AB 


Boy : Rh+ve = Girl : Rh+ve 


Boy : Rh-ve = Girl : Rh+ve & Rh-ve.


  


Blood groups that do not match for marriage ::


Boy : A = Girl : O & B 


Boy : B = Girl : O & A 


Boy : AB = Girl : O, A & B 


Boy : Rh+ve = Girl : Rh-ve.

Report Error

View answer Workspace Report Error Discuss

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

2 2319
Q:

A gradual increase in loudness is known as

A) Crescendo B) Timbre
C) Fortissimo D) None of the above
 
Answer & Explanation Answer: A) Crescendo

Explanation:
Report Error

View Answer Report Error Discuss

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

4 2319
Q:

What molecule carries genetic information?

A) RNA B) DNA
C) Proteins D) Nucleotides
 
Answer & Explanation Answer: B) DNA

Explanation:

The nucleus of a cell contains chromosomes, which carry genetic information in a long molecule called DNA.

Genes are regions of DNA that carry the code to control a particular cell activity or the production of a particular protein.

Report Error

View Answer Report Error Discuss

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

1 2319
Q:

Cobalt 60 is used for cancer treatment it emmits which rays?

A) Alpha B) Beta
C) Gamma D) X rays
 
Answer & Explanation Answer: C) Gamma

Explanation:

Cobalt therapy or cobalt-60 therapy is the medical use of gamma rays from the radioisotope cobalt-60 to treat conditions such as cancer.

 

Cobalt 60 is a synthetic radioactive isotope of cobalt with a half-life of 5.2714 years. It is produced artificially in nuclear reactors.

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 , IT Trainer

4 2318
Q:

Group of 4 is called as

A) Septory B) Qintet
C) Hexet D) Quartet
 
Answer & Explanation Answer: D) Quartet

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

0 2318